diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..e68899a57838374629759fcf8bdb23aed0e8d615 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +__pycache__/ +*.pyc +.cache/ +.DS_Store diff --git a/AUTHORING.md b/AUTHORING.md new file mode 100644 index 0000000000000000000000000000000000000000..f227f76610f43c7198f3c46e9caf5f2202c1d99e --- /dev/null +++ b/AUTHORING.md @@ -0,0 +1,47 @@ +# Authoring a practice environment + +Each environment teaches a language-model agent a piece of real work from one field of study. The agent gets a folder of files and an instruction, works in a terminal, and writes `answer.json`. A hidden, deterministic verifier scores it from 0 to 1. `envs/ward_round/` is the reference implementation: read `env.toml`, `gen.py` and `oracle.py` there before writing anything, and copy its shape. + +## Files in `envs//` (folder name uses underscores) + +- `__init__.py`: empty. +- `env.toml`: `name` (kebab-case), `title`, `isced` (4-digit ISCED-F 2013 code), `summary` (one sentence, max 160 characters, says what the agent does), `task_type` (2 to 4 words), `good_for` (1 to 3 short phrases), `families` (list). +- `gen.py`: `generate(seed, difficulty, family=None) -> practice.core.Task`. Difficulty is 1, 2 or 3. With `family=None` the family is `sorted(FAMILIES)[seed % len(FAMILIES)]`. Three or four families per environment, each a different piece of the field's real work. +- `oracle.py`: standalone script, Python standard library only, that reads the task files from the current directory exactly as an agent would and writes `answer.json`. It must not import `gen.py` or `practice`. It must work out which family it is facing from the files present. +- `validators.py`: only if an answer is not unique (a plan, an ordering, a counterexample). Standalone, standard library only. Each function is `name(answer, args) -> bool` (or a float in [0, 1]) and must never raise on malformed answers: return False. + +## Rules that make the reward trustworthy + +1. **Two code paths.** `gen.py` computes the expected values from its in-memory data. `oracle.py` recomputes them from the files. They share no code. If they disagree, the instruction or the file format is ambiguous: fix that, do not paper over it. +2. **The instruction is the contract.** It names every answer key in backticks, with its unit, type and rounding, and gives every rule, formula, constant and threshold the agent needs, either in the instruction or in a reference file in the task folder (as Ward Round ships `news2_rules.md`). Never rely on the agent recalling a constant. Say how to round ("round half up" where it matters) and that numbers are accepted within one unit of the last decimal asked for. +3. **No knife edges.** When a value decides a category, a flag, a ranking or a rounding, regenerate until it is clearly away from the boundary (see `clear_of`, and the `while True` loops in Ward Round). No ties in rankings or allocations unless the instruction gives a tie-break and the tie-break is tested. +4. **Every check has teeth.** Prefer numeric and structural answers. Avoid checks an agent could pass by guessing (a lone yes/no). Where a boolean or category is needed, also check the numbers behind it. Weight summary checks (a set of flagged ids) 2. +5. **The work must be real.** Files should look like the records a practitioner handles: unsorted rows, irrelevant columns or rows that must be filtered out, units to convert, a rule document to apply. Difficulty 1 is a clean small case; difficulty 2 adds volume and one complication; difficulty 3 adds a second complication and a derived or cross-record answer. Do not make it hard by making it vague. +6. **No leaks.** Expected values never appear in the task files. Reference files give rules, never answers. +7. **Synthetic data only.** No real persons. Real public methods, formulas and constants are welcome and should be named in the module docstring with their source. If you are not certain of a published constant, put the constant in the task's reference file as "use these values" so correctness does not depend on your memory of it. +8. **Determinism.** All randomness comes from `rng_for(ENV + "/" + family, seed, difficulty)`. No clocks, no global `random`, no set-ordering dependence (sort before choosing). +9. **Compatibility.** `gen.py` and tools run on Python 3.9; `oracle.py` and `validators.py` run on 3.9 to 3.12. Standard library only everywhere. No f-string nesting tricks, no `match`, no `X | Y` type syntax. +10. **Plain language.** Instructions are short, concrete and in British English. No emoji, no em dashes. + +## Checks + +Build them with the helpers in `practice/core.py`: `c_int`, `c_num(path, value, decimals)`, `c_str`, `c_bool`, `c_list`, `c_set`, `c_custom(name, args)`. Paths are dotted (`patients.P03.score`). Keys in paths must not contain dots. The answer is always one JSON object. Aim for 6 to 40 checks per task. + +For a non-unique answer, a `c_custom` validator must check every constraint of the problem against the answer itself (not compare with a stored solution), and `args` carries the problem data the validator needs. Also add ordinary checks for any unique derived values. + +## Self-test (must pass before you finish) + +```bash +python3 tools/selftest.py 60 +``` + +It checks, for 180 tasks: determinism, oracle scores exactly 1.0 from the files alone, junk answers score 0, every non-custom check fails when its value is changed, no leaks, and every top-level answer key is named in the instruction. + +Then add `tests/test_.py` (plain asserts, runnable with `python3 tests/test_.py`) with: + +- at least three **hand-worked cases per family**: small inputs whose correct answers you derived by hand or from a published worked example, asserted against the generator's formula functions. This is the guard against a formula that is consistently wrong in both code paths, so take it seriously and show the arithmetic in comments. +- for each custom validator: at least four wrong answers that must be rejected (each violating a different constraint) and one right answer accepted. + +## Report back + +When done, report only: the families, the formulas and constants used with their sources, anything you were unsure about, and the self-test and unit-test output lines. Touch only your own `envs//` folders and `tests/test_.py`. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..be4712362cb6c6f6a9b0f82c22c5a4c1fb287184 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2026 Renaissance Labs + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/VALIDATION.md b/VALIDATION.md new file mode 100644 index 0000000000000000000000000000000000000000..6dc454dba435244015257c2f9ff23e00d5f43d26 --- /dev/null +++ b/VALIDATION.md @@ -0,0 +1,20 @@ +# Practice validation + +Release checked on 23 November 2026. Python 3.9 source tools; Python 3.12 task containers. + +- 13 environments, 49 task families, 1,404 Harbor task directories. +- Each environment has 84 training tasks and 24 evaluation tasks. Evaluation seeds start at 10,000 and are disjoint from training seeds. Task IDs are unique. +- Generator self-tests: 60 seeds at each of three difficulties per environment, 2,340 tasks total, zero failures. These check determinism, independent file-based oracle agreement, junk-answer rejection, per-check mutations, and named answer keys. +- All nine hand-worked test scripts pass. Harris Matrix also checks that its faulty records have a unique minimal repair at all three difficulties. +- Exported directories: all 1,404 tested locally, no-op reward 0 and oracle reward 1, zero failures. +- Docker: one easy task from each of the 49 families, networking disabled, 1 CPU and 1 GB RAM; all no-op rewards 0, all oracle rewards 1. Medium and hard tasks are covered by local checks, not this container smoke test. + +Reproduce the complete checks: + +```sh +python3 tools/export.py +python3 tools/validate.py --exported --docker +python3 tools/make_card.py +``` + +No model baseline or training run has been performed. These checks establish internal correctness and packaging, not practitioner review, realism or training benefit. Data is synthetic; any jurisdiction-dependent rules are fictional and supplied with the task. diff --git a/data/argument-check/eval.jsonl b/data/argument-check/eval.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..205158f65d274f012b867bd77e5ffed4a83fb468 --- /dev/null +++ b/data/argument-check/eval.jsonl @@ -0,0 +1,24 @@ +{"id": "argument-check-consistency-d1-e0000", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "seed": 10000, "title": "Consistency of 4 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 15, "path": "tasks/argument-check/argument-check-consistency-d1-e0000"} +{"id": "argument-check-equivalence-d1-e0001", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "seed": 10001, "title": "Equivalence of 5 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).", "checks": 18, "path": "tasks/argument-check/argument-check-equivalence-d1-e0001"} +{"id": "argument-check-validity-d1-e0002", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "seed": 10002, "title": "Validity of 5 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 19, "path": "tasks/argument-check/argument-check-validity-d1-e0002"} +{"id": "argument-check-consistency-d2-e0003", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "seed": 10003, "title": "Consistency of 6 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 28, "path": "tasks/argument-check/argument-check-consistency-d2-e0003"} +{"id": "argument-check-equivalence-d2-e0004", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "seed": 10004, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.", "checks": 24, "path": "tasks/argument-check/argument-check-equivalence-d2-e0004"} +{"id": "argument-check-validity-d2-e0005", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "seed": 10005, "title": "Validity of 8 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 29, "path": "tasks/argument-check/argument-check-validity-d2-e0005"} +{"id": "argument-check-consistency-d3-e0006", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "seed": 10006, "title": "Consistency of 7 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 35, "path": "tasks/argument-check/argument-check-consistency-d3-e0006"} +{"id": "argument-check-equivalence-d3-e0007", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "seed": 10007, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form.", "checks": 38, "path": "tasks/argument-check/argument-check-equivalence-d3-e0007"} +{"id": "argument-check-validity-d3-e0008", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "seed": 10008, "title": "Validity of 9 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-validity-d3-e0008"} +{"id": "argument-check-consistency-d1-e0009", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "seed": 10009, "title": "Consistency of 4 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 15, "path": "tasks/argument-check/argument-check-consistency-d1-e0009"} +{"id": "argument-check-equivalence-d1-e0010", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "seed": 10010, "title": "Equivalence of 5 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).", "checks": 18, "path": "tasks/argument-check/argument-check-equivalence-d1-e0010"} +{"id": "argument-check-validity-d1-e0011", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "seed": 10011, "title": "Validity of 5 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 19, "path": "tasks/argument-check/argument-check-validity-d1-e0011"} +{"id": "argument-check-consistency-d2-e0012", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "seed": 10012, "title": "Consistency of 6 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 28, "path": "tasks/argument-check/argument-check-consistency-d2-e0012"} +{"id": "argument-check-equivalence-d2-e0013", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "seed": 10013, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.", "checks": 24, "path": "tasks/argument-check/argument-check-equivalence-d2-e0013"} +{"id": "argument-check-validity-d2-e0014", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "seed": 10014, "title": "Validity of 8 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 29, "path": "tasks/argument-check/argument-check-validity-d2-e0014"} +{"id": "argument-check-consistency-d3-e0015", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "seed": 10015, "title": "Consistency of 7 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-consistency-d3-e0015"} +{"id": "argument-check-equivalence-d3-e0016", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "seed": 10016, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form.", "checks": 38, "path": "tasks/argument-check/argument-check-equivalence-d3-e0016"} +{"id": "argument-check-validity-d3-e0017", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "seed": 10017, "title": "Validity of 9 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-validity-d3-e0017"} +{"id": "argument-check-consistency-d1-e0018", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "seed": 10018, "title": "Consistency of 4 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 15, "path": "tasks/argument-check/argument-check-consistency-d1-e0018"} +{"id": "argument-check-equivalence-d1-e0019", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "seed": 10019, "title": "Equivalence of 5 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).", "checks": 18, "path": "tasks/argument-check/argument-check-equivalence-d1-e0019"} +{"id": "argument-check-validity-d1-e0020", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "seed": 10020, "title": "Validity of 5 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 18, "path": "tasks/argument-check/argument-check-validity-d1-e0020"} +{"id": "argument-check-consistency-d2-e0021", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "seed": 10021, "title": "Consistency of 6 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 28, "path": "tasks/argument-check/argument-check-consistency-d2-e0021"} +{"id": "argument-check-equivalence-d2-e0022", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "seed": 10022, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.", "checks": 24, "path": "tasks/argument-check/argument-check-equivalence-d2-e0022"} +{"id": "argument-check-validity-d2-e0023", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "seed": 10023, "title": "Validity of 8 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 29, "path": "tasks/argument-check/argument-check-validity-d2-e0023"} diff --git a/data/argument-check/train.jsonl b/data/argument-check/train.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..86ea7d6f71562dc98938b587729266d5f46d8ff0 --- /dev/null +++ b/data/argument-check/train.jsonl @@ -0,0 +1,84 @@ +{"id": "argument-check-consistency-d1-t0000", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "seed": 0, "title": "Consistency of 4 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 15, "path": "tasks/argument-check/argument-check-consistency-d1-t0000"} +{"id": "argument-check-equivalence-d1-t0001", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "seed": 1, "title": "Equivalence of 5 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).", "checks": 18, "path": "tasks/argument-check/argument-check-equivalence-d1-t0001"} +{"id": "argument-check-validity-d1-t0002", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "seed": 2, "title": "Validity of 5 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 18, "path": "tasks/argument-check/argument-check-validity-d1-t0002"} +{"id": "argument-check-consistency-d2-t0003", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "seed": 3, "title": "Consistency of 6 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 28, "path": "tasks/argument-check/argument-check-consistency-d2-t0003"} +{"id": "argument-check-equivalence-d2-t0004", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "seed": 4, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.", "checks": 24, "path": "tasks/argument-check/argument-check-equivalence-d2-t0004"} +{"id": "argument-check-validity-d2-t0005", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "seed": 5, "title": "Validity of 8 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 29, "path": "tasks/argument-check/argument-check-validity-d2-t0005"} +{"id": "argument-check-consistency-d3-t0006", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "seed": 6, "title": "Consistency of 7 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-consistency-d3-t0006"} +{"id": "argument-check-equivalence-d3-t0007", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "seed": 7, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form.", "checks": 38, "path": "tasks/argument-check/argument-check-equivalence-d3-t0007"} +{"id": "argument-check-validity-d3-t0008", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "seed": 8, "title": "Validity of 9 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-validity-d3-t0008"} +{"id": "argument-check-consistency-d1-t0009", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "seed": 9, "title": "Consistency of 4 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 15, "path": "tasks/argument-check/argument-check-consistency-d1-t0009"} +{"id": "argument-check-equivalence-d1-t0010", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "seed": 10, "title": "Equivalence of 5 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).", "checks": 18, "path": "tasks/argument-check/argument-check-equivalence-d1-t0010"} +{"id": "argument-check-validity-d1-t0011", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "seed": 11, "title": "Validity of 5 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 19, "path": "tasks/argument-check/argument-check-validity-d1-t0011"} +{"id": "argument-check-consistency-d2-t0012", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "seed": 12, "title": "Consistency of 6 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 28, "path": "tasks/argument-check/argument-check-consistency-d2-t0012"} +{"id": "argument-check-equivalence-d2-t0013", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "seed": 13, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.", "checks": 24, "path": "tasks/argument-check/argument-check-equivalence-d2-t0013"} +{"id": "argument-check-validity-d2-t0014", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "seed": 14, "title": "Validity of 8 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 29, "path": "tasks/argument-check/argument-check-validity-d2-t0014"} +{"id": "argument-check-consistency-d3-t0015", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "seed": 15, "title": "Consistency of 7 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-consistency-d3-t0015"} +{"id": "argument-check-equivalence-d3-t0016", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "seed": 16, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form.", "checks": 38, "path": "tasks/argument-check/argument-check-equivalence-d3-t0016"} +{"id": "argument-check-validity-d3-t0017", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "seed": 17, "title": "Validity of 9 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-validity-d3-t0017"} +{"id": "argument-check-consistency-d1-t0018", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "seed": 18, "title": "Consistency of 4 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 15, "path": "tasks/argument-check/argument-check-consistency-d1-t0018"} +{"id": "argument-check-equivalence-d1-t0019", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "seed": 19, "title": "Equivalence of 5 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).", "checks": 18, "path": "tasks/argument-check/argument-check-equivalence-d1-t0019"} +{"id": "argument-check-validity-d1-t0020", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "seed": 20, "title": "Validity of 5 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 19, "path": "tasks/argument-check/argument-check-validity-d1-t0020"} +{"id": "argument-check-consistency-d2-t0021", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "seed": 21, "title": "Consistency of 6 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 28, "path": "tasks/argument-check/argument-check-consistency-d2-t0021"} +{"id": "argument-check-equivalence-d2-t0022", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "seed": 22, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.", "checks": 24, "path": "tasks/argument-check/argument-check-equivalence-d2-t0022"} +{"id": "argument-check-validity-d2-t0023", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "seed": 23, "title": "Validity of 8 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 29, "path": "tasks/argument-check/argument-check-validity-d2-t0023"} +{"id": "argument-check-consistency-d3-t0024", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "seed": 24, "title": "Consistency of 7 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 35, "path": "tasks/argument-check/argument-check-consistency-d3-t0024"} +{"id": "argument-check-equivalence-d3-t0025", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "seed": 25, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form.", "checks": 38, "path": "tasks/argument-check/argument-check-equivalence-d3-t0025"} +{"id": "argument-check-validity-d3-t0026", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "seed": 26, "title": "Validity of 9 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-validity-d3-t0026"} +{"id": "argument-check-consistency-d1-t0027", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "seed": 27, "title": "Consistency of 4 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 15, "path": "tasks/argument-check/argument-check-consistency-d1-t0027"} +{"id": "argument-check-equivalence-d1-t0028", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "seed": 28, "title": "Equivalence of 5 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).", "checks": 18, "path": "tasks/argument-check/argument-check-equivalence-d1-t0028"} +{"id": "argument-check-validity-d1-t0029", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "seed": 29, "title": "Validity of 5 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 19, "path": "tasks/argument-check/argument-check-validity-d1-t0029"} +{"id": "argument-check-consistency-d2-t0030", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "seed": 30, "title": "Consistency of 6 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 28, "path": "tasks/argument-check/argument-check-consistency-d2-t0030"} +{"id": "argument-check-equivalence-d2-t0031", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "seed": 31, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.", "checks": 24, "path": "tasks/argument-check/argument-check-equivalence-d2-t0031"} +{"id": "argument-check-validity-d2-t0032", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "seed": 32, "title": "Validity of 8 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 29, "path": "tasks/argument-check/argument-check-validity-d2-t0032"} +{"id": "argument-check-consistency-d3-t0033", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "seed": 33, "title": "Consistency of 7 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-consistency-d3-t0033"} +{"id": "argument-check-equivalence-d3-t0034", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "seed": 34, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form.", "checks": 38, "path": "tasks/argument-check/argument-check-equivalence-d3-t0034"} +{"id": "argument-check-validity-d3-t0035", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "seed": 35, "title": "Validity of 9 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-validity-d3-t0035"} +{"id": "argument-check-consistency-d1-t0036", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "seed": 36, "title": "Consistency of 4 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 15, "path": "tasks/argument-check/argument-check-consistency-d1-t0036"} +{"id": "argument-check-equivalence-d1-t0037", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "seed": 37, "title": "Equivalence of 5 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).", "checks": 19, "path": "tasks/argument-check/argument-check-equivalence-d1-t0037"} +{"id": "argument-check-validity-d1-t0038", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "seed": 38, "title": "Validity of 5 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 19, "path": "tasks/argument-check/argument-check-validity-d1-t0038"} +{"id": "argument-check-consistency-d2-t0039", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "seed": 39, "title": "Consistency of 6 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 28, "path": "tasks/argument-check/argument-check-consistency-d2-t0039"} +{"id": "argument-check-equivalence-d2-t0040", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "seed": 40, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.", "checks": 24, "path": "tasks/argument-check/argument-check-equivalence-d2-t0040"} +{"id": "argument-check-validity-d2-t0041", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "seed": 41, "title": "Validity of 8 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 29, "path": "tasks/argument-check/argument-check-validity-d2-t0041"} +{"id": "argument-check-consistency-d3-t0042", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "seed": 42, "title": "Consistency of 7 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 35, "path": "tasks/argument-check/argument-check-consistency-d3-t0042"} +{"id": "argument-check-equivalence-d3-t0043", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "seed": 43, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form.", "checks": 38, "path": "tasks/argument-check/argument-check-equivalence-d3-t0043"} +{"id": "argument-check-validity-d3-t0044", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "seed": 44, "title": "Validity of 9 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-validity-d3-t0044"} +{"id": "argument-check-consistency-d1-t0045", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "seed": 45, "title": "Consistency of 4 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 15, "path": "tasks/argument-check/argument-check-consistency-d1-t0045"} +{"id": "argument-check-equivalence-d1-t0046", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "seed": 46, "title": "Equivalence of 5 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).", "checks": 19, "path": "tasks/argument-check/argument-check-equivalence-d1-t0046"} +{"id": "argument-check-validity-d1-t0047", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "seed": 47, "title": "Validity of 5 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 18, "path": "tasks/argument-check/argument-check-validity-d1-t0047"} +{"id": "argument-check-consistency-d2-t0048", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "seed": 48, "title": "Consistency of 6 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 28, "path": "tasks/argument-check/argument-check-consistency-d2-t0048"} +{"id": "argument-check-equivalence-d2-t0049", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "seed": 49, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.", "checks": 24, "path": "tasks/argument-check/argument-check-equivalence-d2-t0049"} +{"id": "argument-check-validity-d2-t0050", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "seed": 50, "title": "Validity of 8 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 29, "path": "tasks/argument-check/argument-check-validity-d2-t0050"} +{"id": "argument-check-consistency-d3-t0051", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "seed": 51, "title": "Consistency of 7 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-consistency-d3-t0051"} +{"id": "argument-check-equivalence-d3-t0052", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "seed": 52, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form.", "checks": 38, "path": "tasks/argument-check/argument-check-equivalence-d3-t0052"} +{"id": "argument-check-validity-d3-t0053", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "seed": 53, "title": "Validity of 9 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-validity-d3-t0053"} +{"id": "argument-check-consistency-d1-t0054", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "seed": 54, "title": "Consistency of 4 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 15, "path": "tasks/argument-check/argument-check-consistency-d1-t0054"} +{"id": "argument-check-equivalence-d1-t0055", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "seed": 55, "title": "Equivalence of 5 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).", "checks": 18, "path": "tasks/argument-check/argument-check-equivalence-d1-t0055"} +{"id": "argument-check-validity-d1-t0056", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "seed": 56, "title": "Validity of 5 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 19, "path": "tasks/argument-check/argument-check-validity-d1-t0056"} +{"id": "argument-check-consistency-d2-t0057", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "seed": 57, "title": "Consistency of 6 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 28, "path": "tasks/argument-check/argument-check-consistency-d2-t0057"} +{"id": "argument-check-equivalence-d2-t0058", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "seed": 58, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.", "checks": 24, "path": "tasks/argument-check/argument-check-equivalence-d2-t0058"} +{"id": "argument-check-validity-d2-t0059", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "seed": 59, "title": "Validity of 8 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 29, "path": "tasks/argument-check/argument-check-validity-d2-t0059"} +{"id": "argument-check-consistency-d3-t0060", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "seed": 60, "title": "Consistency of 7 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-consistency-d3-t0060"} +{"id": "argument-check-equivalence-d3-t0061", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "seed": 61, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form.", "checks": 38, "path": "tasks/argument-check/argument-check-equivalence-d3-t0061"} +{"id": "argument-check-validity-d3-t0062", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "seed": 62, "title": "Validity of 9 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-validity-d3-t0062"} +{"id": "argument-check-consistency-d1-t0063", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "seed": 63, "title": "Consistency of 4 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 15, "path": "tasks/argument-check/argument-check-consistency-d1-t0063"} +{"id": "argument-check-equivalence-d1-t0064", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "seed": 64, "title": "Equivalence of 5 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).", "checks": 19, "path": "tasks/argument-check/argument-check-equivalence-d1-t0064"} +{"id": "argument-check-validity-d1-t0065", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "seed": 65, "title": "Validity of 5 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 18, "path": "tasks/argument-check/argument-check-validity-d1-t0065"} +{"id": "argument-check-consistency-d2-t0066", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "seed": 66, "title": "Consistency of 6 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 28, "path": "tasks/argument-check/argument-check-consistency-d2-t0066"} +{"id": "argument-check-equivalence-d2-t0067", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "seed": 67, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.", "checks": 24, "path": "tasks/argument-check/argument-check-equivalence-d2-t0067"} +{"id": "argument-check-validity-d2-t0068", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "seed": 68, "title": "Validity of 8 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 29, "path": "tasks/argument-check/argument-check-validity-d2-t0068"} +{"id": "argument-check-consistency-d3-t0069", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "seed": 69, "title": "Consistency of 7 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 35, "path": "tasks/argument-check/argument-check-consistency-d3-t0069"} +{"id": "argument-check-equivalence-d3-t0070", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "seed": 70, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form.", "checks": 38, "path": "tasks/argument-check/argument-check-equivalence-d3-t0070"} +{"id": "argument-check-validity-d3-t0071", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "seed": 71, "title": "Validity of 9 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-validity-d3-t0071"} +{"id": "argument-check-consistency-d1-t0072", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "seed": 72, "title": "Consistency of 4 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 15, "path": "tasks/argument-check/argument-check-consistency-d1-t0072"} +{"id": "argument-check-equivalence-d1-t0073", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "seed": 73, "title": "Equivalence of 5 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).", "checks": 19, "path": "tasks/argument-check/argument-check-equivalence-d1-t0073"} +{"id": "argument-check-validity-d1-t0074", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "seed": 74, "title": "Validity of 5 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 19, "path": "tasks/argument-check/argument-check-validity-d1-t0074"} +{"id": "argument-check-consistency-d2-t0075", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "seed": 75, "title": "Consistency of 6 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 28, "path": "tasks/argument-check/argument-check-consistency-d2-t0075"} +{"id": "argument-check-equivalence-d2-t0076", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "seed": 76, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.", "checks": 24, "path": "tasks/argument-check/argument-check-equivalence-d2-t0076"} +{"id": "argument-check-validity-d2-t0077", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "seed": 77, "title": "Validity of 8 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 29, "path": "tasks/argument-check/argument-check-validity-d2-t0077"} +{"id": "argument-check-consistency-d3-t0078", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "seed": 78, "title": "Consistency of 7 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-consistency-d3-t0078"} +{"id": "argument-check-equivalence-d3-t0079", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "seed": 79, "title": "Equivalence of 6 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form.", "checks": 38, "path": "tasks/argument-check/argument-check-equivalence-d3-t0079"} +{"id": "argument-check-validity-d3-t0080", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "seed": 80, "title": "Validity of 9 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 37, "path": "tasks/argument-check/argument-check-validity-d3-t0080"} +{"id": "argument-check-consistency-d1-t0081", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "seed": 81, "title": "Consistency of 4 sets of sentences", "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order).", "checks": 15, "path": "tasks/argument-check/argument-check-consistency-d1-t0081"} +{"id": "argument-check-equivalence-d1-t0082", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "seed": 82, "title": "Equivalence of 5 pairs of formulas", "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).", "checks": 19, "path": "tasks/argument-check/argument-check-equivalence-d1-t0082"} +{"id": "argument-check-validity-d1-t0083", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "seed": 83, "title": "Validity of 5 arguments", "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order).", "checks": 19, "path": "tasks/argument-check/argument-check-validity-d1-t0083"} diff --git a/data/class-test/eval.jsonl b/data/class-test/eval.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..6861d73c4ff7310168aa40f5292c44e681b7aec4 --- /dev/null +++ b/data/class-test/eval.jsonl @@ -0,0 +1,24 @@ +{"id": "class-test-distractors-d1-e0000", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "seed": 10000, "title": "Distractor analysis of a 6-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/class-test/class-test-distractors-d1-e0000"} +{"id": "class-test-item-analysis-d1-e0001", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "seed": 10001, "title": "Item analysis of a 8-item test", "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 23 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/class-test/class-test-item-analysis-d1-e0001"} +{"id": "class-test-marking-d1-e0002", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "seed": 10002, "title": "Mark a 20-item test for 6 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/class-test/class-test-marking-d1-e0002"} +{"id": "class-test-moderation-d1-e0003", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "seed": 10003, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/class-test/class-test-moderation-d1-e0003"} +{"id": "class-test-distractors-d2-e0004", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "seed": 10004, "title": "Distractor analysis of a 8-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/class-test/class-test-distractors-d2-e0004"} +{"id": "class-test-item-analysis-d2-e0005", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "seed": 10005, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/class-test/class-test-item-analysis-d2-e0005"} +{"id": "class-test-marking-d2-e0006", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "seed": 10006, "title": "Mark a 24-item test for 9 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/class-test/class-test-marking-d2-e0006"} +{"id": "class-test-moderation-d2-e0007", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "seed": 10007, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/class-test/class-test-moderation-d2-e0007"} +{"id": "class-test-distractors-d3-e0008", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "seed": 10008, "title": "Distractor analysis of a 7-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-distractors-d3-e0008"} +{"id": "class-test-item-analysis-d3-e0009", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "seed": 10009, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/class-test/class-test-item-analysis-d3-e0009"} +{"id": "class-test-marking-d3-e0010", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "seed": 10010, "title": "Mark a 30-item test for 10 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-marking-d3-e0010"} +{"id": "class-test-moderation-d3-e0011", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "seed": 10011, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/class-test/class-test-moderation-d3-e0011"} +{"id": "class-test-distractors-d1-e0012", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "seed": 10012, "title": "Distractor analysis of a 6-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/class-test/class-test-distractors-d1-e0012"} +{"id": "class-test-item-analysis-d1-e0013", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "seed": 10013, "title": "Item analysis of a 8-item test", "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 22 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/class-test/class-test-item-analysis-d1-e0013"} +{"id": "class-test-marking-d1-e0014", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "seed": 10014, "title": "Mark a 20-item test for 6 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/class-test/class-test-marking-d1-e0014"} +{"id": "class-test-moderation-d1-e0015", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "seed": 10015, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/class-test/class-test-moderation-d1-e0015"} +{"id": "class-test-distractors-d2-e0016", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "seed": 10016, "title": "Distractor analysis of a 8-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/class-test/class-test-distractors-d2-e0016"} +{"id": "class-test-item-analysis-d2-e0017", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "seed": 10017, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/class-test/class-test-item-analysis-d2-e0017"} +{"id": "class-test-marking-d2-e0018", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "seed": 10018, "title": "Mark a 24-item test for 9 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/class-test/class-test-marking-d2-e0018"} +{"id": "class-test-moderation-d2-e0019", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "seed": 10019, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/class-test/class-test-moderation-d2-e0019"} +{"id": "class-test-distractors-d3-e0020", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "seed": 10020, "title": "Distractor analysis of a 7-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-distractors-d3-e0020"} +{"id": "class-test-item-analysis-d3-e0021", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "seed": 10021, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/class-test/class-test-item-analysis-d3-e0021"} +{"id": "class-test-marking-d3-e0022", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "seed": 10022, "title": "Mark a 30-item test for 10 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-marking-d3-e0022"} +{"id": "class-test-moderation-d3-e0023", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "seed": 10023, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/class-test/class-test-moderation-d3-e0023"} diff --git a/data/class-test/train.jsonl b/data/class-test/train.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..cef55cfe6d56e546ee72788d3bfc57a892ed83e0 --- /dev/null +++ b/data/class-test/train.jsonl @@ -0,0 +1,84 @@ +{"id": "class-test-distractors-d1-t0000", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "seed": 0, "title": "Distractor analysis of a 6-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/class-test/class-test-distractors-d1-t0000"} +{"id": "class-test-item-analysis-d1-t0001", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "seed": 1, "title": "Item analysis of a 8-item test", "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 22 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/class-test/class-test-item-analysis-d1-t0001"} +{"id": "class-test-marking-d1-t0002", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "seed": 2, "title": "Mark a 20-item test for 6 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/class-test/class-test-marking-d1-t0002"} +{"id": "class-test-moderation-d1-t0003", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "seed": 3, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/class-test/class-test-moderation-d1-t0003"} +{"id": "class-test-distractors-d2-t0004", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "seed": 4, "title": "Distractor analysis of a 8-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/class-test/class-test-distractors-d2-t0004"} +{"id": "class-test-item-analysis-d2-t0005", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "seed": 5, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/class-test/class-test-item-analysis-d2-t0005"} +{"id": "class-test-marking-d2-t0006", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "seed": 6, "title": "Mark a 24-item test for 9 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/class-test/class-test-marking-d2-t0006"} +{"id": "class-test-moderation-d2-t0007", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "seed": 7, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/class-test/class-test-moderation-d2-t0007"} +{"id": "class-test-distractors-d3-t0008", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "seed": 8, "title": "Distractor analysis of a 7-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-distractors-d3-t0008"} +{"id": "class-test-item-analysis-d3-t0009", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "seed": 9, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/class-test/class-test-item-analysis-d3-t0009"} +{"id": "class-test-marking-d3-t0010", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "seed": 10, "title": "Mark a 30-item test for 10 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-marking-d3-t0010"} +{"id": "class-test-moderation-d3-t0011", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "seed": 11, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/class-test/class-test-moderation-d3-t0011"} +{"id": "class-test-distractors-d1-t0012", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "seed": 12, "title": "Distractor analysis of a 6-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/class-test/class-test-distractors-d1-t0012"} +{"id": "class-test-item-analysis-d1-t0013", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "seed": 13, "title": "Item analysis of a 8-item test", "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 18 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/class-test/class-test-item-analysis-d1-t0013"} +{"id": "class-test-marking-d1-t0014", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "seed": 14, "title": "Mark a 20-item test for 6 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/class-test/class-test-marking-d1-t0014"} +{"id": "class-test-moderation-d1-t0015", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "seed": 15, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/class-test/class-test-moderation-d1-t0015"} +{"id": "class-test-distractors-d2-t0016", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "seed": 16, "title": "Distractor analysis of a 8-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/class-test/class-test-distractors-d2-t0016"} +{"id": "class-test-item-analysis-d2-t0017", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "seed": 17, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/class-test/class-test-item-analysis-d2-t0017"} +{"id": "class-test-marking-d2-t0018", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "seed": 18, "title": "Mark a 24-item test for 9 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/class-test/class-test-marking-d2-t0018"} +{"id": "class-test-moderation-d2-t0019", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "seed": 19, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/class-test/class-test-moderation-d2-t0019"} +{"id": "class-test-distractors-d3-t0020", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "seed": 20, "title": "Distractor analysis of a 7-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-distractors-d3-t0020"} +{"id": "class-test-item-analysis-d3-t0021", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "seed": 21, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/class-test/class-test-item-analysis-d3-t0021"} +{"id": "class-test-marking-d3-t0022", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "seed": 22, "title": "Mark a 30-item test for 10 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-marking-d3-t0022"} +{"id": "class-test-moderation-d3-t0023", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "seed": 23, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/class-test/class-test-moderation-d3-t0023"} +{"id": "class-test-distractors-d1-t0024", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "seed": 24, "title": "Distractor analysis of a 6-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/class-test/class-test-distractors-d1-t0024"} +{"id": "class-test-item-analysis-d1-t0025", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "seed": 25, "title": "Item analysis of a 8-item test", "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 25 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/class-test/class-test-item-analysis-d1-t0025"} +{"id": "class-test-marking-d1-t0026", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "seed": 26, "title": "Mark a 20-item test for 6 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/class-test/class-test-marking-d1-t0026"} +{"id": "class-test-moderation-d1-t0027", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "seed": 27, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/class-test/class-test-moderation-d1-t0027"} +{"id": "class-test-distractors-d2-t0028", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "seed": 28, "title": "Distractor analysis of a 8-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/class-test/class-test-distractors-d2-t0028"} +{"id": "class-test-item-analysis-d2-t0029", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "seed": 29, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/class-test/class-test-item-analysis-d2-t0029"} +{"id": "class-test-marking-d2-t0030", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "seed": 30, "title": "Mark a 24-item test for 9 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/class-test/class-test-marking-d2-t0030"} +{"id": "class-test-moderation-d2-t0031", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "seed": 31, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/class-test/class-test-moderation-d2-t0031"} +{"id": "class-test-distractors-d3-t0032", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "seed": 32, "title": "Distractor analysis of a 7-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-distractors-d3-t0032"} +{"id": "class-test-item-analysis-d3-t0033", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "seed": 33, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/class-test/class-test-item-analysis-d3-t0033"} +{"id": "class-test-marking-d3-t0034", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "seed": 34, "title": "Mark a 30-item test for 10 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-marking-d3-t0034"} +{"id": "class-test-moderation-d3-t0035", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "seed": 35, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/class-test/class-test-moderation-d3-t0035"} +{"id": "class-test-distractors-d1-t0036", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "seed": 36, "title": "Distractor analysis of a 6-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/class-test/class-test-distractors-d1-t0036"} +{"id": "class-test-item-analysis-d1-t0037", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "seed": 37, "title": "Item analysis of a 8-item test", "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 19 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/class-test/class-test-item-analysis-d1-t0037"} +{"id": "class-test-marking-d1-t0038", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "seed": 38, "title": "Mark a 20-item test for 6 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/class-test/class-test-marking-d1-t0038"} +{"id": "class-test-moderation-d1-t0039", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "seed": 39, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/class-test/class-test-moderation-d1-t0039"} +{"id": "class-test-distractors-d2-t0040", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "seed": 40, "title": "Distractor analysis of a 8-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/class-test/class-test-distractors-d2-t0040"} +{"id": "class-test-item-analysis-d2-t0041", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "seed": 41, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/class-test/class-test-item-analysis-d2-t0041"} +{"id": "class-test-marking-d2-t0042", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "seed": 42, "title": "Mark a 24-item test for 9 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/class-test/class-test-marking-d2-t0042"} +{"id": "class-test-moderation-d2-t0043", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "seed": 43, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/class-test/class-test-moderation-d2-t0043"} +{"id": "class-test-distractors-d3-t0044", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "seed": 44, "title": "Distractor analysis of a 7-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-distractors-d3-t0044"} +{"id": "class-test-item-analysis-d3-t0045", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "seed": 45, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/class-test/class-test-item-analysis-d3-t0045"} +{"id": "class-test-marking-d3-t0046", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "seed": 46, "title": "Mark a 30-item test for 10 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-marking-d3-t0046"} +{"id": "class-test-moderation-d3-t0047", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "seed": 47, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/class-test/class-test-moderation-d3-t0047"} +{"id": "class-test-distractors-d1-t0048", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "seed": 48, "title": "Distractor analysis of a 6-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/class-test/class-test-distractors-d1-t0048"} +{"id": "class-test-item-analysis-d1-t0049", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "seed": 49, "title": "Item analysis of a 8-item test", "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 21 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/class-test/class-test-item-analysis-d1-t0049"} +{"id": "class-test-marking-d1-t0050", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "seed": 50, "title": "Mark a 20-item test for 6 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/class-test/class-test-marking-d1-t0050"} +{"id": "class-test-moderation-d1-t0051", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "seed": 51, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/class-test/class-test-moderation-d1-t0051"} +{"id": "class-test-distractors-d2-t0052", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "seed": 52, "title": "Distractor analysis of a 8-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/class-test/class-test-distractors-d2-t0052"} +{"id": "class-test-item-analysis-d2-t0053", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "seed": 53, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/class-test/class-test-item-analysis-d2-t0053"} +{"id": "class-test-marking-d2-t0054", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "seed": 54, "title": "Mark a 24-item test for 9 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/class-test/class-test-marking-d2-t0054"} +{"id": "class-test-moderation-d2-t0055", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "seed": 55, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/class-test/class-test-moderation-d2-t0055"} +{"id": "class-test-distractors-d3-t0056", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "seed": 56, "title": "Distractor analysis of a 7-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-distractors-d3-t0056"} +{"id": "class-test-item-analysis-d3-t0057", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "seed": 57, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/class-test/class-test-item-analysis-d3-t0057"} +{"id": "class-test-marking-d3-t0058", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "seed": 58, "title": "Mark a 30-item test for 10 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-marking-d3-t0058"} +{"id": "class-test-moderation-d3-t0059", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "seed": 59, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/class-test/class-test-moderation-d3-t0059"} +{"id": "class-test-distractors-d1-t0060", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "seed": 60, "title": "Distractor analysis of a 6-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/class-test/class-test-distractors-d1-t0060"} +{"id": "class-test-item-analysis-d1-t0061", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "seed": 61, "title": "Item analysis of a 8-item test", "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 19 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/class-test/class-test-item-analysis-d1-t0061"} +{"id": "class-test-marking-d1-t0062", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "seed": 62, "title": "Mark a 20-item test for 6 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/class-test/class-test-marking-d1-t0062"} +{"id": "class-test-moderation-d1-t0063", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "seed": 63, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/class-test/class-test-moderation-d1-t0063"} +{"id": "class-test-distractors-d2-t0064", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "seed": 64, "title": "Distractor analysis of a 8-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/class-test/class-test-distractors-d2-t0064"} +{"id": "class-test-item-analysis-d2-t0065", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "seed": 65, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/class-test/class-test-item-analysis-d2-t0065"} +{"id": "class-test-marking-d2-t0066", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "seed": 66, "title": "Mark a 24-item test for 9 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/class-test/class-test-marking-d2-t0066"} +{"id": "class-test-moderation-d2-t0067", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "seed": 67, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/class-test/class-test-moderation-d2-t0067"} +{"id": "class-test-distractors-d3-t0068", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "seed": 68, "title": "Distractor analysis of a 7-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-distractors-d3-t0068"} +{"id": "class-test-item-analysis-d3-t0069", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "seed": 69, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/class-test/class-test-item-analysis-d3-t0069"} +{"id": "class-test-marking-d3-t0070", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "seed": 70, "title": "Mark a 30-item test for 10 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-marking-d3-t0070"} +{"id": "class-test-moderation-d3-t0071", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "seed": 71, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/class-test/class-test-moderation-d3-t0071"} +{"id": "class-test-distractors-d1-t0072", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "seed": 72, "title": "Distractor analysis of a 6-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/class-test/class-test-distractors-d1-t0072"} +{"id": "class-test-item-analysis-d1-t0073", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "seed": 73, "title": "Item analysis of a 8-item test", "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 19 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/class-test/class-test-item-analysis-d1-t0073"} +{"id": "class-test-marking-d1-t0074", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "seed": 74, "title": "Mark a 20-item test for 6 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/class-test/class-test-marking-d1-t0074"} +{"id": "class-test-moderation-d1-t0075", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "seed": 75, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/class-test/class-test-moderation-d1-t0075"} +{"id": "class-test-distractors-d2-t0076", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "seed": 76, "title": "Distractor analysis of a 8-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/class-test/class-test-distractors-d2-t0076"} +{"id": "class-test-item-analysis-d2-t0077", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "seed": 77, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/class-test/class-test-item-analysis-d2-t0077"} +{"id": "class-test-marking-d2-t0078", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "seed": 78, "title": "Mark a 24-item test for 9 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/class-test/class-test-marking-d2-t0078"} +{"id": "class-test-moderation-d2-t0079", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "seed": 79, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/class-test/class-test-moderation-d2-t0079"} +{"id": "class-test-distractors-d3-t0080", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "seed": 80, "title": "Distractor analysis of a 7-item test", "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-distractors-d3-t0080"} +{"id": "class-test-item-analysis-d3-t0081", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "seed": 81, "title": "Item analysis of a 10-item test", "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/class-test/class-test-item-analysis-d3-t0081"} +{"id": "class-test-marking-d3-t0082", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "seed": 82, "title": "Mark a 30-item test for 10 students", "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/class-test/class-test-marking-d3-t0082"} +{"id": "class-test-moderation-d3-t0083", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "seed": 83, "title": "Standardise the marks of a class test", "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/class-test/class-test-moderation-d3-t0083"} diff --git a/data/emissions-inventory/eval.jsonl b/data/emissions-inventory/eval.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..5a16516450cd1b5ff1b44de8122511bd1b51e4ef --- /dev/null +++ b/data/emissions-inventory/eval.jsonl @@ -0,0 +1,24 @@ +{"id": "emissions-inventory-activity-data-d1-e0000", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "seed": 10000, "title": "Activity data to tonnes CO2e, 9 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2019 greenhouse-gas inventory for Lindqvist Castings (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2019 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-e0000"} +{"id": "emissions-inventory-data-quality-d1-e0001", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "seed": 10001, "title": "Cleaning meter data for 3 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2019 monthly electricity consumption export for the meters of Ostervik Bakery Group (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-e0001"} +{"id": "emissions-inventory-multi-gas-d1-e0002", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "seed": 10002, "title": "CO2, CH4 and N2O for 4 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2019 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-e0002"} +{"id": "emissions-inventory-time-series-d1-e0003", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "seed": 10003, "title": "Emissions trend over 5 years", "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (tonnes of product). The rows are in no particular order. `target.md` gives the base year and the reduction target of Ostervik Bakery Group (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2021 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-e0003"} +{"id": "emissions-inventory-activity-data-d2-e0004", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "seed": 10004, "title": "Activity data to tonnes CO2e, 28 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2021 greenhouse-gas inventory for Marrow Vale Housing (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2021 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-e0004"} +{"id": "emissions-inventory-data-quality-d2-e0005", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "seed": 10005, "title": "Cleaning meter data for 5 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2021 monthly electricity consumption export for the meters of Lindqvist Castings (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-e0005"} +{"id": "emissions-inventory-multi-gas-d2-e0006", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "seed": 10006, "title": "CO2, CH4 and N2O for 6 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2019 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-e0006"} +{"id": "emissions-inventory-time-series-d2-e0007", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "seed": 10007, "title": "Emissions trend over 6 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (m2 of heated floor area). `target.md` gives the base year and the reduction target of Ostervik Bakery Group (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2018\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2023 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2023, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2023 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-e0007"} +{"id": "emissions-inventory-activity-data-d3-e0008", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "seed": 10008, "title": "Activity data to tonnes CO2e, 31 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2024 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2024 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 21, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-e0008"} +{"id": "emissions-inventory-data-quality-d3-e0009", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "seed": 10009, "title": "Cleaning meter data for 6 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2020 monthly electricity consumption export for the meters of Lindqvist Castings (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 23, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-e0009"} +{"id": "emissions-inventory-multi-gas-d3-e0010", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "seed": 10010, "title": "CO2, CH4 and N2O for 8 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2023 greenhouse-gas inventory for Brantholm Municipality (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 39, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-e0010"} +{"id": "emissions-inventory-time-series-d3-e0011", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "seed": 10011, "title": "Emissions trend over 7 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (thousand parcels delivered); a year's output is the sum over sites. Site Cedar was sold in 2021. Under the base-year recalculation policy in `target.md`, leave site Cedar out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Lindqvist Castings (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2022 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2022, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2022 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2022 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-e0011"} +{"id": "emissions-inventory-activity-data-d1-e0012", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "seed": 10012, "title": "Activity data to tonnes CO2e, 14 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2020 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2020 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-e0012"} +{"id": "emissions-inventory-data-quality-d1-e0013", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "seed": 10013, "title": "Cleaning meter data for 3 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2019 monthly electricity consumption export for the meters of Kestrel Joinery (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-e0013"} +{"id": "emissions-inventory-multi-gas-d1-e0014", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "seed": 10014, "title": "CO2, CH4 and N2O for 4 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-e0014"} +{"id": "emissions-inventory-time-series-d1-e0015", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "seed": 10015, "title": "Emissions trend over 5 years", "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (tonnes of product). The rows are in no particular order. `target.md` gives the base year and the reduction target of Ostervik Bakery Group (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2018\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2022 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-e0015"} +{"id": "emissions-inventory-activity-data-d2-e0016", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "seed": 10016, "title": "Activity data to tonnes CO2e, 26 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2020 greenhouse-gas inventory for Harlow Fold Logistics (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2020 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-e0016"} +{"id": "emissions-inventory-data-quality-d2-e0017", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "seed": 10017, "title": "Cleaning meter data for 5 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2021 monthly electricity consumption export for the meters of Marrow Vale Housing (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-e0017"} +{"id": "emissions-inventory-multi-gas-d2-e0018", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "seed": 10018, "title": "CO2, CH4 and N2O for 6 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2019 greenhouse-gas inventory for Lindqvist Castings (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-e0018"} +{"id": "emissions-inventory-time-series-d2-e0019", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "seed": 10019, "title": "Emissions trend over 6 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (residents). `target.md` gives the base year and the reduction target of Marrow Vale Housing (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2015\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2015.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2015.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2020 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2020, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2020 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-e0019"} +{"id": "emissions-inventory-activity-data-d3-e0020", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "seed": 10020, "title": "Activity data to tonnes CO2e, 30 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2023 greenhouse-gas inventory for Brantholm Municipality (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2023 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-e0020"} +{"id": "emissions-inventory-data-quality-d3-e0021", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "seed": 10021, "title": "Cleaning meter data for 6 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2022 monthly electricity consumption export for the meters of Brantholm Municipality (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 24, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-e0021"} +{"id": "emissions-inventory-multi-gas-d3-e0022", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "seed": 10022, "title": "CO2, CH4 and N2O for 8 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2020 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 39, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-e0022"} +{"id": "emissions-inventory-time-series-d3-e0023", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "seed": 10023, "title": "Emissions trend over 7 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (m2 of heated floor area); a year's output is the sum over sites. Site Birch was sold in 2023. Under the base-year recalculation policy in `target.md`, leave site Birch out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Vessby Dairy Cooperative (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2018\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2024 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2024, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2024 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2024 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-e0023"} diff --git a/data/emissions-inventory/train.jsonl b/data/emissions-inventory/train.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..9c744805f50e7e8f527b501c14f02963e034cd2b --- /dev/null +++ b/data/emissions-inventory/train.jsonl @@ -0,0 +1,84 @@ +{"id": "emissions-inventory-activity-data-d1-t0000", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "seed": 0, "title": "Activity data to tonnes CO2e, 9 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2020 greenhouse-gas inventory for Ostervik Bakery Group (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2020 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-t0000"} +{"id": "emissions-inventory-data-quality-d1-t0001", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "seed": 1, "title": "Cleaning meter data for 3 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2022 monthly electricity consumption export for the meters of Brantholm Municipality (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-t0001"} +{"id": "emissions-inventory-multi-gas-d1-t0002", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "seed": 2, "title": "CO2, CH4 and N2O for 4 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Brantholm Municipality (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-t0002"} +{"id": "emissions-inventory-time-series-d1-t0003", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "seed": 3, "title": "Emissions trend over 5 years", "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (tonnes of product). The rows are in no particular order. `target.md` gives the base year and the reduction target of Marrow Vale Housing (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2021 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-t0003"} +{"id": "emissions-inventory-activity-data-d2-t0004", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "seed": 4, "title": "Activity data to tonnes CO2e, 25 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2023 greenhouse-gas inventory for Lindqvist Castings (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2023 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-t0004"} +{"id": "emissions-inventory-data-quality-d2-t0005", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "seed": 5, "title": "Cleaning meter data for 5 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2022 monthly electricity consumption export for the meters of Kestrel Joinery (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-t0005"} +{"id": "emissions-inventory-multi-gas-d2-t0006", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "seed": 6, "title": "CO2, CH4 and N2O for 6 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2023 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-t0006"} +{"id": "emissions-inventory-time-series-d2-t0007", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "seed": 7, "title": "Emissions trend over 6 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (thousand parcels delivered). `target.md` gives the base year and the reduction target of Vessby Dairy Cooperative (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2022 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2022, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2022 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-t0007"} +{"id": "emissions-inventory-activity-data-d3-t0008", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "seed": 8, "title": "Activity data to tonnes CO2e, 35 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2019 greenhouse-gas inventory for Harlow Fold Logistics (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2019 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-t0008"} +{"id": "emissions-inventory-data-quality-d3-t0009", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "seed": 9, "title": "Cleaning meter data for 6 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2023 monthly electricity consumption export for the meters of Tarnwick Borough Council (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 23, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-t0009"} +{"id": "emissions-inventory-multi-gas-d3-t0010", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "seed": 10, "title": "CO2, CH4 and N2O for 8 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2021 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 39, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-t0010"} +{"id": "emissions-inventory-time-series-d3-t0011", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "seed": 11, "title": "Emissions trend over 7 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (tonnes of product); a year's output is the sum over sites. Site Birch was sold in 2021. Under the base-year recalculation policy in `target.md`, leave site Birch out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Kestrel Joinery (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2022 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2022, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2022 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2022 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-t0011"} +{"id": "emissions-inventory-activity-data-d1-t0012", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "seed": 12, "title": "Activity data to tonnes CO2e, 9 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2023 greenhouse-gas inventory for Ostervik Bakery Group (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2023 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-t0012"} +{"id": "emissions-inventory-data-quality-d1-t0013", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "seed": 13, "title": "Cleaning meter data for 3 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2023 monthly electricity consumption export for the meters of Vessby Dairy Cooperative (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-t0013"} +{"id": "emissions-inventory-multi-gas-d1-t0014", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "seed": 14, "title": "CO2, CH4 and N2O for 4 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-t0014"} +{"id": "emissions-inventory-time-series-d1-t0015", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "seed": 15, "title": "Emissions trend over 5 years", "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (thousand parcels delivered). The rows are in no particular order. `target.md` gives the base year and the reduction target of Lindqvist Castings (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2021 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-t0015"} +{"id": "emissions-inventory-activity-data-d2-t0016", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "seed": 16, "title": "Activity data to tonnes CO2e, 22 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2020 greenhouse-gas inventory for Harlow Fold Logistics (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2020 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-t0016"} +{"id": "emissions-inventory-data-quality-d2-t0017", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "seed": 17, "title": "Cleaning meter data for 5 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2022 monthly electricity consumption export for the meters of Marrow Vale Housing (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-t0017"} +{"id": "emissions-inventory-multi-gas-d2-t0018", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "seed": 18, "title": "CO2, CH4 and N2O for 6 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2020 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-t0018"} +{"id": "emissions-inventory-time-series-d2-t0019", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "seed": 19, "title": "Emissions trend over 6 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (m2 of heated floor area). `target.md` gives the base year and the reduction target of Marrow Vale Housing (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2022 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2022, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2022 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-t0019"} +{"id": "emissions-inventory-activity-data-d3-t0020", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "seed": 20, "title": "Activity data to tonnes CO2e, 30 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2019 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2019 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-t0020"} +{"id": "emissions-inventory-data-quality-d3-t0021", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "seed": 21, "title": "Cleaning meter data for 6 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2023 monthly electricity consumption export for the meters of Brantholm Municipality (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 24, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-t0021"} +{"id": "emissions-inventory-multi-gas-d3-t0022", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "seed": 22, "title": "CO2, CH4 and N2O for 8 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2020 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 39, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-t0022"} +{"id": "emissions-inventory-time-series-d3-t0023", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "seed": 23, "title": "Emissions trend over 7 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (m2 of heated floor area); a year's output is the sum over sites. Site Alder was sold in 2022. Under the base-year recalculation policy in `target.md`, leave site Alder out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Vessby Dairy Cooperative (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2023 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2023, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2023 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2023 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-t0023"} +{"id": "emissions-inventory-activity-data-d1-t0024", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "seed": 24, "title": "Activity data to tonnes CO2e, 10 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2024 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2024 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-t0024"} +{"id": "emissions-inventory-data-quality-d1-t0025", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "seed": 25, "title": "Cleaning meter data for 3 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2023 monthly electricity consumption export for the meters of Marrow Vale Housing (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-t0025"} +{"id": "emissions-inventory-multi-gas-d1-t0026", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "seed": 26, "title": "CO2, CH4 and N2O for 4 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Lindqvist Castings (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-t0026"} +{"id": "emissions-inventory-time-series-d1-t0027", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "seed": 27, "title": "Emissions trend over 5 years", "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (m2 of heated floor area). The rows are in no particular order. `target.md` gives the base year and the reduction target of Marrow Vale Housing (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2020 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-t0027"} +{"id": "emissions-inventory-activity-data-d2-t0028", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "seed": 28, "title": "Activity data to tonnes CO2e, 25 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2023 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2023 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-t0028"} +{"id": "emissions-inventory-data-quality-d2-t0029", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "seed": 29, "title": "Cleaning meter data for 5 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2023 monthly electricity consumption export for the meters of Brantholm Municipality (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-t0029"} +{"id": "emissions-inventory-multi-gas-d2-t0030", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "seed": 30, "title": "CO2, CH4 and N2O for 6 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2021 greenhouse-gas inventory for Marrow Vale Housing (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-t0030"} +{"id": "emissions-inventory-time-series-d2-t0031", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "seed": 31, "title": "Emissions trend over 6 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (m2 of heated floor area). `target.md` gives the base year and the reduction target of Harlow Fold Logistics (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2022 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2022, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2022 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-t0031"} +{"id": "emissions-inventory-activity-data-d3-t0032", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "seed": 32, "title": "Activity data to tonnes CO2e, 33 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2024 greenhouse-gas inventory for Brantholm Municipality (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2024 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-t0032"} +{"id": "emissions-inventory-data-quality-d3-t0033", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "seed": 33, "title": "Cleaning meter data for 6 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2022 monthly electricity consumption export for the meters of Harlow Fold Logistics (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 24, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-t0033"} +{"id": "emissions-inventory-multi-gas-d3-t0034", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "seed": 34, "title": "CO2, CH4 and N2O for 8 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Harlow Fold Logistics (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 39, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-t0034"} +{"id": "emissions-inventory-time-series-d3-t0035", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "seed": 35, "title": "Emissions trend over 7 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (tonnes of product); a year's output is the sum over sites. Site Cedar was sold in 2020. Under the base-year recalculation policy in `target.md`, leave site Cedar out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Vessby Dairy Cooperative (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2015\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2015.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2015.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2021 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2021, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2021 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2021 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-t0035"} +{"id": "emissions-inventory-activity-data-d1-t0036", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "seed": 36, "title": "Activity data to tonnes CO2e, 13 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2024 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2024 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-t0036"} +{"id": "emissions-inventory-data-quality-d1-t0037", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "seed": 37, "title": "Cleaning meter data for 3 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2021 monthly electricity consumption export for the meters of Kestrel Joinery (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-t0037"} +{"id": "emissions-inventory-multi-gas-d1-t0038", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "seed": 38, "title": "CO2, CH4 and N2O for 4 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2022 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-t0038"} +{"id": "emissions-inventory-time-series-d1-t0039", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "seed": 39, "title": "Emissions trend over 5 years", "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (tonnes of product). The rows are in no particular order. `target.md` gives the base year and the reduction target of Brantholm Municipality (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2020 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-t0039"} +{"id": "emissions-inventory-activity-data-d2-t0040", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "seed": 40, "title": "Activity data to tonnes CO2e, 23 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2021 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2021 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-t0040"} +{"id": "emissions-inventory-data-quality-d2-t0041", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "seed": 41, "title": "Cleaning meter data for 5 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2022 monthly electricity consumption export for the meters of Kestrel Joinery (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-t0041"} +{"id": "emissions-inventory-multi-gas-d2-t0042", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "seed": 42, "title": "CO2, CH4 and N2O for 6 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2020 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-t0042"} +{"id": "emissions-inventory-time-series-d2-t0043", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "seed": 43, "title": "Emissions trend over 6 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (tonnes of product). `target.md` gives the base year and the reduction target of Tarnwick Borough Council (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2014\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2014.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2014.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2019 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2019, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2019 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-t0043"} +{"id": "emissions-inventory-activity-data-d3-t0044", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "seed": 44, "title": "Activity data to tonnes CO2e, 31 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2021 greenhouse-gas inventory for Brantholm Municipality (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2021 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 21, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-t0044"} +{"id": "emissions-inventory-data-quality-d3-t0045", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "seed": 45, "title": "Cleaning meter data for 6 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2024 monthly electricity consumption export for the meters of Harlow Fold Logistics (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-t0045"} +{"id": "emissions-inventory-multi-gas-d3-t0046", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "seed": 46, "title": "CO2, CH4 and N2O for 8 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2019 greenhouse-gas inventory for Lindqvist Castings (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 39, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-t0046"} +{"id": "emissions-inventory-time-series-d3-t0047", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "seed": 47, "title": "Emissions trend over 7 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (m2 of heated floor area); a year's output is the sum over sites. Site Dunlin was sold in 2022. Under the base-year recalculation policy in `target.md`, leave site Dunlin out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Tarnwick Borough Council (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2023 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2023, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2023 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2023 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-t0047"} +{"id": "emissions-inventory-activity-data-d1-t0048", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "seed": 48, "title": "Activity data to tonnes CO2e, 11 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2019 greenhouse-gas inventory for Marrow Vale Housing (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2019 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-t0048"} +{"id": "emissions-inventory-data-quality-d1-t0049", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "seed": 49, "title": "Cleaning meter data for 3 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2023 monthly electricity consumption export for the meters of Tarnwick Borough Council (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-t0049"} +{"id": "emissions-inventory-multi-gas-d1-t0050", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "seed": 50, "title": "CO2, CH4 and N2O for 4 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2022 greenhouse-gas inventory for Lindqvist Castings (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-t0050"} +{"id": "emissions-inventory-time-series-d1-t0051", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "seed": 51, "title": "Emissions trend over 5 years", "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (residents). The rows are in no particular order. `target.md` gives the base year and the reduction target of Marrow Vale Housing (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2020 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-t0051"} +{"id": "emissions-inventory-activity-data-d2-t0052", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "seed": 52, "title": "Activity data to tonnes CO2e, 22 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2023 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2023 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-t0052"} +{"id": "emissions-inventory-data-quality-d2-t0053", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "seed": 53, "title": "Cleaning meter data for 5 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2021 monthly electricity consumption export for the meters of Vessby Dairy Cooperative (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-t0053"} +{"id": "emissions-inventory-multi-gas-d2-t0054", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "seed": 54, "title": "CO2, CH4 and N2O for 6 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2022 greenhouse-gas inventory for Lindqvist Castings (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-t0054"} +{"id": "emissions-inventory-time-series-d2-t0055", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "seed": 55, "title": "Emissions trend over 6 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (thousand parcels delivered). `target.md` gives the base year and the reduction target of Vessby Dairy Cooperative (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2018\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2023 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2023, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2023 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-t0055"} +{"id": "emissions-inventory-activity-data-d3-t0056", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "seed": 56, "title": "Activity data to tonnes CO2e, 32 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2019 greenhouse-gas inventory for Ostervik Bakery Group (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2019 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-t0056"} +{"id": "emissions-inventory-data-quality-d3-t0057", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "seed": 57, "title": "Cleaning meter data for 6 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2021 monthly electricity consumption export for the meters of Brantholm Municipality (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-t0057"} +{"id": "emissions-inventory-multi-gas-d3-t0058", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "seed": 58, "title": "CO2, CH4 and N2O for 8 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Brantholm Municipality (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 39, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-t0058"} +{"id": "emissions-inventory-time-series-d3-t0059", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "seed": 59, "title": "Emissions trend over 7 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (thousand parcels delivered); a year's output is the sum over sites. Site Birch was sold in 2023. Under the base-year recalculation policy in `target.md`, leave site Birch out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Harlow Fold Logistics (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2018\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2024 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2024, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2024 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2024 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-t0059"} +{"id": "emissions-inventory-activity-data-d1-t0060", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "seed": 60, "title": "Activity data to tonnes CO2e, 11 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2020 greenhouse-gas inventory for Harlow Fold Logistics (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2020 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-t0060"} +{"id": "emissions-inventory-data-quality-d1-t0061", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "seed": 61, "title": "Cleaning meter data for 3 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2021 monthly electricity consumption export for the meters of Kestrel Joinery (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-t0061"} +{"id": "emissions-inventory-multi-gas-d1-t0062", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "seed": 62, "title": "CO2, CH4 and N2O for 4 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2022 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-t0062"} +{"id": "emissions-inventory-time-series-d1-t0063", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "seed": 63, "title": "Emissions trend over 5 years", "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (m2 of heated floor area). The rows are in no particular order. `target.md` gives the base year and the reduction target of Marrow Vale Housing (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2020 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-t0063"} +{"id": "emissions-inventory-activity-data-d2-t0064", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "seed": 64, "title": "Activity data to tonnes CO2e, 24 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2020 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2020 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-t0064"} +{"id": "emissions-inventory-data-quality-d2-t0065", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "seed": 65, "title": "Cleaning meter data for 5 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2024 monthly electricity consumption export for the meters of Marrow Vale Housing (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-t0065"} +{"id": "emissions-inventory-multi-gas-d2-t0066", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "seed": 66, "title": "CO2, CH4 and N2O for 6 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Ostervik Bakery Group (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-t0066"} +{"id": "emissions-inventory-time-series-d2-t0067", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "seed": 67, "title": "Emissions trend over 6 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (tonnes of product). `target.md` gives the base year and the reduction target of Kestrel Joinery (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2021 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2021, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2021 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-t0067"} +{"id": "emissions-inventory-activity-data-d3-t0068", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "seed": 68, "title": "Activity data to tonnes CO2e, 32 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2019 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2019 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-t0068"} +{"id": "emissions-inventory-data-quality-d3-t0069", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "seed": 69, "title": "Cleaning meter data for 6 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2020 monthly electricity consumption export for the meters of Harlow Fold Logistics (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-t0069"} +{"id": "emissions-inventory-multi-gas-d3-t0070", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "seed": 70, "title": "CO2, CH4 and N2O for 8 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 39, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-t0070"} +{"id": "emissions-inventory-time-series-d3-t0071", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "seed": 71, "title": "Emissions trend over 7 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (m2 of heated floor area); a year's output is the sum over sites. Site Dunlin was sold in 2021. Under the base-year recalculation policy in `target.md`, leave site Dunlin out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Vessby Dairy Cooperative (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2022 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2022, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2022 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2022 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-t0071"} +{"id": "emissions-inventory-activity-data-d1-t0072", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "seed": 72, "title": "Activity data to tonnes CO2e, 10 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2019 greenhouse-gas inventory for Ostervik Bakery Group (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2019 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-t0072"} +{"id": "emissions-inventory-data-quality-d1-t0073", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "seed": 73, "title": "Cleaning meter data for 3 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2021 monthly electricity consumption export for the meters of Harlow Fold Logistics (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-t0073"} +{"id": "emissions-inventory-multi-gas-d1-t0074", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "seed": 74, "title": "CO2, CH4 and N2O for 4 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-t0074"} +{"id": "emissions-inventory-time-series-d1-t0075", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "seed": 75, "title": "Emissions trend over 5 years", "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (residents). The rows are in no particular order. `target.md` gives the base year and the reduction target of Ostervik Bakery Group (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2020 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-t0075"} +{"id": "emissions-inventory-activity-data-d2-t0076", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "seed": 76, "title": "Activity data to tonnes CO2e, 26 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2024 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2024 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-t0076"} +{"id": "emissions-inventory-data-quality-d2-t0077", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "seed": 77, "title": "Cleaning meter data for 5 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2023 monthly electricity consumption export for the meters of Ostervik Bakery Group (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-t0077"} +{"id": "emissions-inventory-multi-gas-d2-t0078", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "seed": 78, "title": "CO2, CH4 and N2O for 6 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2019 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-t0078"} +{"id": "emissions-inventory-time-series-d2-t0079", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "seed": 79, "title": "Emissions trend over 6 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (residents). `target.md` gives the base year and the reduction target of Brantholm Municipality (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2021 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2021, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2021 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-t0079"} +{"id": "emissions-inventory-activity-data-d3-t0080", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "seed": 80, "title": "Activity data to tonnes CO2e, 33 records", "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2022 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2022 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-t0080"} +{"id": "emissions-inventory-data-quality-d3-t0081", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "seed": 81, "title": "Cleaning meter data for 6 meters", "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2020 monthly electricity consumption export for the meters of Tarnwick Borough Council (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 24, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-t0081"} +{"id": "emissions-inventory-multi-gas-d3-t0082", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "seed": 82, "title": "CO2, CH4 and N2O for 8 sources", "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2019 greenhouse-gas inventory for Harlow Fold Logistics (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 39, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-t0082"} +{"id": "emissions-inventory-time-series-d3-t0083", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "seed": 83, "title": "Emissions trend over 7 years", "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (thousand parcels delivered); a year's output is the sum over sites. Site Elm was sold in 2020. Under the base-year recalculation policy in `target.md`, leave site Elm out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Brantholm Municipality (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2015\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2015.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2015.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2021 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2021, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2021 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2021 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-t0083"} diff --git a/data/exposure-assessment/eval.jsonl b/data/exposure-assessment/eval.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..a7d51dbc9bf90d03c8efadcadb54d6537cb481e7 --- /dev/null +++ b/data/exposure-assessment/eval.jsonl @@ -0,0 +1,24 @@ +{"id": "exposure-assessment-chemicals-d1-e0000", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "seed": 10000, "title": "Airborne exposure for 3 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-e0000"} +{"id": "exposure-assessment-incidents-d1-e0001", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "seed": 10001, "title": "Injury rates for 2024", "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2024 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 2 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 6, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-e0001"} +{"id": "exposure-assessment-noise-d1-e0002", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "seed": 10002, "title": "Noise exposure for 3 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-e0002"} +{"id": "exposure-assessment-vibration-d1-e0003", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "seed": 10003, "title": "Hand-arm vibration for 4 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-e0003"} +{"id": "exposure-assessment-chemicals-d2-e0004", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "seed": 10004, "title": "Airborne exposure for 5 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-e0004"} +{"id": "exposure-assessment-incidents-d2-e0005", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "seed": 10005, "title": "Injury rates for 2022", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2022 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (3 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-e0005"} +{"id": "exposure-assessment-noise-d2-e0006", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "seed": 10006, "title": "Noise exposure for 5 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-e0006"} +{"id": "exposure-assessment-vibration-d2-e0007", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "seed": 10007, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-e0007"} +{"id": "exposure-assessment-chemicals-d3-e0008", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "seed": 10008, "title": "Airborne exposure for 4 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-e0008"} +{"id": "exposure-assessment-incidents-d3-e0009", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "seed": 10009, "title": "Injury rates for 2023", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2022 and 2023 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2023, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (3 decimals), all for 2023.\n- `site`: an object keyed by year (`\"2022\"` and `\"2023\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2023 minus the site LTIFR for 2022, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2023 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2023 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-e0009"} +{"id": "exposure-assessment-noise-d3-e0010", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "seed": 10010, "title": "Noise exposure for 4 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-e0010"} +{"id": "exposure-assessment-vibration-d3-e0011", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "seed": 10011, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-e0011"} +{"id": "exposure-assessment-chemicals-d1-e0012", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "seed": 10012, "title": "Airborne exposure for 3 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-e0012"} +{"id": "exposure-assessment-incidents-d1-e0013", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "seed": 10013, "title": "Injury rates for 2021", "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2021 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 2 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 6, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-e0013"} +{"id": "exposure-assessment-noise-d1-e0014", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "seed": 10014, "title": "Noise exposure for 3 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-e0014"} +{"id": "exposure-assessment-vibration-d1-e0015", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "seed": 10015, "title": "Hand-arm vibration for 4 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-e0015"} +{"id": "exposure-assessment-chemicals-d2-e0016", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "seed": 10016, "title": "Airborne exposure for 5 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-e0016"} +{"id": "exposure-assessment-incidents-d2-e0017", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "seed": 10017, "title": "Injury rates for 2023", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2023 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-e0017"} +{"id": "exposure-assessment-noise-d2-e0018", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "seed": 10018, "title": "Noise exposure for 5 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-e0018"} +{"id": "exposure-assessment-vibration-d2-e0019", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "seed": 10019, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-e0019"} +{"id": "exposure-assessment-chemicals-d3-e0020", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "seed": 10020, "title": "Airborne exposure for 4 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-e0020"} +{"id": "exposure-assessment-incidents-d3-e0021", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "seed": 10021, "title": "Injury rates for 2021", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2020 and 2021 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2021, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals), all for 2021.\n- `site`: an object keyed by year (`\"2020\"` and `\"2021\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2021 minus the site LTIFR for 2020, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2021 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2021 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-e0021"} +{"id": "exposure-assessment-noise-d3-e0022", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "seed": 10022, "title": "Noise exposure for 4 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-e0022"} +{"id": "exposure-assessment-vibration-d3-e0023", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "seed": 10023, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-e0023"} diff --git a/data/exposure-assessment/train.jsonl b/data/exposure-assessment/train.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..f97147b88336c4b200ff05a3a778819078f2b9b1 --- /dev/null +++ b/data/exposure-assessment/train.jsonl @@ -0,0 +1,84 @@ +{"id": "exposure-assessment-chemicals-d1-t0000", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "seed": 0, "title": "Airborne exposure for 3 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-t0000"} +{"id": "exposure-assessment-incidents-d1-t0001", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "seed": 1, "title": "Injury rates for 2024", "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2024 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 2 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 6, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-t0001"} +{"id": "exposure-assessment-noise-d1-t0002", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "seed": 2, "title": "Noise exposure for 3 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-t0002"} +{"id": "exposure-assessment-vibration-d1-t0003", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "seed": 3, "title": "Hand-arm vibration for 4 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-t0003"} +{"id": "exposure-assessment-chemicals-d2-t0004", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "seed": 4, "title": "Airborne exposure for 5 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-t0004"} +{"id": "exposure-assessment-incidents-d2-t0005", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "seed": 5, "title": "Injury rates for 2023", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2023 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-t0005"} +{"id": "exposure-assessment-noise-d2-t0006", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "seed": 6, "title": "Noise exposure for 5 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-t0006"} +{"id": "exposure-assessment-vibration-d2-t0007", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "seed": 7, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-t0007"} +{"id": "exposure-assessment-chemicals-d3-t0008", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "seed": 8, "title": "Airborne exposure for 4 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-t0008"} +{"id": "exposure-assessment-incidents-d3-t0009", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "seed": 9, "title": "Injury rates for 2024", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2023 and 2024 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2024, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (3 decimals), all for 2024.\n- `site`: an object keyed by year (`\"2023\"` and `\"2024\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2024 minus the site LTIFR for 2023, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2024 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2024 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-t0009"} +{"id": "exposure-assessment-noise-d3-t0010", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "seed": 10, "title": "Noise exposure for 4 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-t0010"} +{"id": "exposure-assessment-vibration-d3-t0011", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "seed": 11, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-t0011"} +{"id": "exposure-assessment-chemicals-d1-t0012", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "seed": 12, "title": "Airborne exposure for 3 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-t0012"} +{"id": "exposure-assessment-incidents-d1-t0013", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "seed": 13, "title": "Injury rates for 2022", "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2022 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 2 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 6, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-t0013"} +{"id": "exposure-assessment-noise-d1-t0014", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "seed": 14, "title": "Noise exposure for 3 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-t0014"} +{"id": "exposure-assessment-vibration-d1-t0015", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "seed": 15, "title": "Hand-arm vibration for 4 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-t0015"} +{"id": "exposure-assessment-chemicals-d2-t0016", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "seed": 16, "title": "Airborne exposure for 5 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-t0016"} +{"id": "exposure-assessment-incidents-d2-t0017", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "seed": 17, "title": "Injury rates for 2024", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2024 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-t0017"} +{"id": "exposure-assessment-noise-d2-t0018", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "seed": 18, "title": "Noise exposure for 5 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-t0018"} +{"id": "exposure-assessment-vibration-d2-t0019", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "seed": 19, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-t0019"} +{"id": "exposure-assessment-chemicals-d3-t0020", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "seed": 20, "title": "Airborne exposure for 4 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-t0020"} +{"id": "exposure-assessment-incidents-d3-t0021", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "seed": 21, "title": "Injury rates for 2021", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2020 and 2021 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2021, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals), all for 2021.\n- `site`: an object keyed by year (`\"2020\"` and `\"2021\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2021 minus the site LTIFR for 2020, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2021 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2021 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-t0021"} +{"id": "exposure-assessment-noise-d3-t0022", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "seed": 22, "title": "Noise exposure for 4 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-t0022"} +{"id": "exposure-assessment-vibration-d3-t0023", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "seed": 23, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-t0023"} +{"id": "exposure-assessment-chemicals-d1-t0024", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "seed": 24, "title": "Airborne exposure for 3 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-t0024"} +{"id": "exposure-assessment-incidents-d1-t0025", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "seed": 25, "title": "Injury rates for 2022", "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2022 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 3 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 6, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-t0025"} +{"id": "exposure-assessment-noise-d1-t0026", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "seed": 26, "title": "Noise exposure for 3 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-t0026"} +{"id": "exposure-assessment-vibration-d1-t0027", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "seed": 27, "title": "Hand-arm vibration for 4 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-t0027"} +{"id": "exposure-assessment-chemicals-d2-t0028", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "seed": 28, "title": "Airborne exposure for 5 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-t0028"} +{"id": "exposure-assessment-incidents-d2-t0029", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "seed": 29, "title": "Injury rates for 2023", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2023 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (3 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-t0029"} +{"id": "exposure-assessment-noise-d2-t0030", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "seed": 30, "title": "Noise exposure for 5 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-t0030"} +{"id": "exposure-assessment-vibration-d2-t0031", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "seed": 31, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-t0031"} +{"id": "exposure-assessment-chemicals-d3-t0032", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "seed": 32, "title": "Airborne exposure for 4 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-t0032"} +{"id": "exposure-assessment-incidents-d3-t0033", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "seed": 33, "title": "Injury rates for 2023", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2022 and 2023 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2023, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals), all for 2023.\n- `site`: an object keyed by year (`\"2022\"` and `\"2023\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2023 minus the site LTIFR for 2022, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2023 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2023 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-t0033"} +{"id": "exposure-assessment-noise-d3-t0034", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "seed": 34, "title": "Noise exposure for 4 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-t0034"} +{"id": "exposure-assessment-vibration-d3-t0035", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "seed": 35, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-t0035"} +{"id": "exposure-assessment-chemicals-d1-t0036", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "seed": 36, "title": "Airborne exposure for 3 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-t0036"} +{"id": "exposure-assessment-incidents-d1-t0037", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "seed": 37, "title": "Injury rates for 2022", "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2022 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 2 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 6, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-t0037"} +{"id": "exposure-assessment-noise-d1-t0038", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "seed": 38, "title": "Noise exposure for 3 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-t0038"} +{"id": "exposure-assessment-vibration-d1-t0039", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "seed": 39, "title": "Hand-arm vibration for 4 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-t0039"} +{"id": "exposure-assessment-chemicals-d2-t0040", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "seed": 40, "title": "Airborne exposure for 5 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-t0040"} +{"id": "exposure-assessment-incidents-d2-t0041", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "seed": 41, "title": "Injury rates for 2022", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2022 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-t0041"} +{"id": "exposure-assessment-noise-d2-t0042", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "seed": 42, "title": "Noise exposure for 5 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-t0042"} +{"id": "exposure-assessment-vibration-d2-t0043", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "seed": 43, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-t0043"} +{"id": "exposure-assessment-chemicals-d3-t0044", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "seed": 44, "title": "Airborne exposure for 4 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-t0044"} +{"id": "exposure-assessment-incidents-d3-t0045", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "seed": 45, "title": "Injury rates for 2024", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2023 and 2024 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2024, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (3 decimals), all for 2024.\n- `site`: an object keyed by year (`\"2023\"` and `\"2024\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2024 minus the site LTIFR for 2023, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2024 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2024 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-t0045"} +{"id": "exposure-assessment-noise-d3-t0046", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "seed": 46, "title": "Noise exposure for 4 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-t0046"} +{"id": "exposure-assessment-vibration-d3-t0047", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "seed": 47, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-t0047"} +{"id": "exposure-assessment-chemicals-d1-t0048", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "seed": 48, "title": "Airborne exposure for 3 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-t0048"} +{"id": "exposure-assessment-incidents-d1-t0049", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "seed": 49, "title": "Injury rates for 2021", "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2021 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 3 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 6, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-t0049"} +{"id": "exposure-assessment-noise-d1-t0050", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "seed": 50, "title": "Noise exposure for 3 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-t0050"} +{"id": "exposure-assessment-vibration-d1-t0051", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "seed": 51, "title": "Hand-arm vibration for 4 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-t0051"} +{"id": "exposure-assessment-chemicals-d2-t0052", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "seed": 52, "title": "Airborne exposure for 5 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-t0052"} +{"id": "exposure-assessment-incidents-d2-t0053", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "seed": 53, "title": "Injury rates for 2022", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2022 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-t0053"} +{"id": "exposure-assessment-noise-d2-t0054", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "seed": 54, "title": "Noise exposure for 5 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-t0054"} +{"id": "exposure-assessment-vibration-d2-t0055", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "seed": 55, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-t0055"} +{"id": "exposure-assessment-chemicals-d3-t0056", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "seed": 56, "title": "Airborne exposure for 4 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-t0056"} +{"id": "exposure-assessment-incidents-d3-t0057", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "seed": 57, "title": "Injury rates for 2024", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2023 and 2024 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2024, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals), all for 2024.\n- `site`: an object keyed by year (`\"2023\"` and `\"2024\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2024 minus the site LTIFR for 2023, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2024 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2024 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-t0057"} +{"id": "exposure-assessment-noise-d3-t0058", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "seed": 58, "title": "Noise exposure for 4 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-t0058"} +{"id": "exposure-assessment-vibration-d3-t0059", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "seed": 59, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-t0059"} +{"id": "exposure-assessment-chemicals-d1-t0060", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "seed": 60, "title": "Airborne exposure for 3 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-t0060"} +{"id": "exposure-assessment-incidents-d1-t0061", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "seed": 61, "title": "Injury rates for 2022", "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2022 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 2 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 6, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-t0061"} +{"id": "exposure-assessment-noise-d1-t0062", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "seed": 62, "title": "Noise exposure for 3 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-t0062"} +{"id": "exposure-assessment-vibration-d1-t0063", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "seed": 63, "title": "Hand-arm vibration for 4 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-t0063"} +{"id": "exposure-assessment-chemicals-d2-t0064", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "seed": 64, "title": "Airborne exposure for 5 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-t0064"} +{"id": "exposure-assessment-incidents-d2-t0065", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "seed": 65, "title": "Injury rates for 2021", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2021 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-t0065"} +{"id": "exposure-assessment-noise-d2-t0066", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "seed": 66, "title": "Noise exposure for 5 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-t0066"} +{"id": "exposure-assessment-vibration-d2-t0067", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "seed": 67, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-t0067"} +{"id": "exposure-assessment-chemicals-d3-t0068", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "seed": 68, "title": "Airborne exposure for 4 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-t0068"} +{"id": "exposure-assessment-incidents-d3-t0069", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "seed": 69, "title": "Injury rates for 2023", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2022 and 2023 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2023, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals), all for 2023.\n- `site`: an object keyed by year (`\"2022\"` and `\"2023\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2023 minus the site LTIFR for 2022, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2023 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2023 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-t0069"} +{"id": "exposure-assessment-noise-d3-t0070", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "seed": 70, "title": "Noise exposure for 4 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-t0070"} +{"id": "exposure-assessment-vibration-d3-t0071", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "seed": 71, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-t0071"} +{"id": "exposure-assessment-chemicals-d1-t0072", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "seed": 72, "title": "Airborne exposure for 3 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-t0072"} +{"id": "exposure-assessment-incidents-d1-t0073", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "seed": 73, "title": "Injury rates for 2021", "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2021 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 2 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 6, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-t0073"} +{"id": "exposure-assessment-noise-d1-t0074", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "seed": 74, "title": "Noise exposure for 3 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-t0074"} +{"id": "exposure-assessment-vibration-d1-t0075", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "seed": 75, "title": "Hand-arm vibration for 4 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-t0075"} +{"id": "exposure-assessment-chemicals-d2-t0076", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "seed": 76, "title": "Airborne exposure for 5 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-t0076"} +{"id": "exposure-assessment-incidents-d2-t0077", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "seed": 77, "title": "Injury rates for 2024", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2024 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-t0077"} +{"id": "exposure-assessment-noise-d2-t0078", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "seed": 78, "title": "Noise exposure for 5 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-t0078"} +{"id": "exposure-assessment-vibration-d2-t0079", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "seed": 79, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-t0079"} +{"id": "exposure-assessment-chemicals-d3-t0080", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "seed": 80, "title": "Airborne exposure for 4 workers", "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-t0080"} +{"id": "exposure-assessment-incidents-d3-t0081", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "seed": 81, "title": "Injury rates for 2024", "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2023 and 2024 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2024, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals), all for 2024.\n- `site`: an object keyed by year (`\"2023\"` and `\"2024\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2024 minus the site LTIFR for 2023, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2024 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2024 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 29, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-t0081"} +{"id": "exposure-assessment-noise-d3-t0082", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "seed": 82, "title": "Noise exposure for 4 workers", "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-t0082"} +{"id": "exposure-assessment-vibration-d3-t0083", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "seed": 83, "title": "Hand-arm vibration for 5 operators", "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-t0083"} diff --git a/data/harris-matrix/eval.jsonl b/data/harris-matrix/eval.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..7d58bd608501d3cba8ea016f8d64221a401c04f5 --- /dev/null +++ b/data/harris-matrix/eval.jsonl @@ -0,0 +1,24 @@ +{"id": "harris-matrix-dating-d1-e0000", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "seed": 10000, "title": "Dating 8 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 7, "path": "tasks/harris-matrix/harris-matrix-dating-d1-e0000"} +{"id": "harris-matrix-errors-d1-e0001", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "seed": 10001, "title": "Impossible relations among 8 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 14, "path": "tasks/harris-matrix/harris-matrix-errors-d1-e0001"} +{"id": "harris-matrix-reduction-d1-e0002", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "seed": 10002, "title": "Reduced matrix for 9 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 11, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-e0002"} +{"id": "harris-matrix-sequence-d1-e0003", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "seed": 10003, "title": "Stratigraphic sequence of 8 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 12, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-e0003"} +{"id": "harris-matrix-dating-d2-e0004", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "seed": 10004, "title": "Dating 13 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 10, "path": "tasks/harris-matrix/harris-matrix-dating-d2-e0004"} +{"id": "harris-matrix-errors-d2-e0005", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "seed": 10005, "title": "Impossible relations among 14 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 20 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 20, "path": "tasks/harris-matrix/harris-matrix-errors-d2-e0005"} +{"id": "harris-matrix-reduction-d2-e0006", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "seed": 10006, "title": "Reduced matrix for 14 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 19 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 16, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-e0006"} +{"id": "harris-matrix-sequence-d2-e0007", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "seed": 10007, "title": "Stratigraphic sequence of 16 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 20, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-e0007"} +{"id": "harris-matrix-dating-d3-e0008", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "seed": 10008, "title": "Dating 16 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order).", "checks": 21, "path": "tasks/harris-matrix/harris-matrix-dating-d3-e0008"} +{"id": "harris-matrix-errors-d3-e0009", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "seed": 10009, "title": "Impossible relations among 19 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 26 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 25, "path": "tasks/harris-matrix/harris-matrix-errors-d3-e0009"} +{"id": "harris-matrix-reduction-d3-e0010", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "seed": 10010, "title": "Reduced matrix for 21 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts, 32 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 23, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-e0010"} +{"id": "harris-matrix-sequence-d3-e0011", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "seed": 10011, "title": "Stratigraphic sequence of 21 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once.", "checks": 26, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-e0011"} +{"id": "harris-matrix-dating-d1-e0012", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "seed": 10012, "title": "Dating 9 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 8, "path": "tasks/harris-matrix/harris-matrix-dating-d1-e0012"} +{"id": "harris-matrix-errors-d1-e0013", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "seed": 10013, "title": "Impossible relations among 8 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 10 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 14, "path": "tasks/harris-matrix/harris-matrix-errors-d1-e0013"} +{"id": "harris-matrix-reduction-d1-e0014", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "seed": 10014, "title": "Reduced matrix for 9 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts, 12 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 11, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-e0014"} +{"id": "harris-matrix-sequence-d1-e0015", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "seed": 10015, "title": "Stratigraphic sequence of 8 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 12, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-e0015"} +{"id": "harris-matrix-dating-d2-e0016", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "seed": 10016, "title": "Dating 13 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 12, "path": "tasks/harris-matrix/harris-matrix-dating-d2-e0016"} +{"id": "harris-matrix-errors-d2-e0017", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "seed": 10017, "title": "Impossible relations among 14 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 18 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 20, "path": "tasks/harris-matrix/harris-matrix-errors-d2-e0017"} +{"id": "harris-matrix-reduction-d2-e0018", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "seed": 10018, "title": "Reduced matrix for 14 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 19 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 16, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-e0018"} +{"id": "harris-matrix-sequence-d2-e0019", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "seed": 10019, "title": "Stratigraphic sequence of 14 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 18, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-e0019"} +{"id": "harris-matrix-dating-d3-e0020", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "seed": 10020, "title": "Dating 18 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (18 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order).", "checks": 27, "path": "tasks/harris-matrix/harris-matrix-dating-d3-e0020"} +{"id": "harris-matrix-errors-d3-e0021", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "seed": 10021, "title": "Impossible relations among 19 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 29 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 25, "path": "tasks/harris-matrix/harris-matrix-errors-d3-e0021"} +{"id": "harris-matrix-reduction-d3-e0022", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "seed": 10022, "title": "Reduced matrix for 19 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 31 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 21, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-e0022"} +{"id": "harris-matrix-sequence-d3-e0023", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "seed": 10023, "title": "Stratigraphic sequence of 20 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (20 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once.", "checks": 25, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-e0023"} diff --git a/data/harris-matrix/train.jsonl b/data/harris-matrix/train.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..1de9789a40d8ac8b8fbf6e63290e15f8ce136aa8 --- /dev/null +++ b/data/harris-matrix/train.jsonl @@ -0,0 +1,84 @@ +{"id": "harris-matrix-dating-d1-t0000", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "seed": 0, "title": "Dating 8 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 8, "path": "tasks/harris-matrix/harris-matrix-dating-d1-t0000"} +{"id": "harris-matrix-errors-d1-t0001", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "seed": 1, "title": "Impossible relations among 8 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 12 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 14, "path": "tasks/harris-matrix/harris-matrix-errors-d1-t0001"} +{"id": "harris-matrix-reduction-d1-t0002", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "seed": 2, "title": "Reduced matrix for 9 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 11, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-t0002"} +{"id": "harris-matrix-sequence-d1-t0003", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "seed": 3, "title": "Stratigraphic sequence of 9 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 13, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-t0003"} +{"id": "harris-matrix-dating-d2-t0004", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "seed": 4, "title": "Dating 14 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 12, "path": "tasks/harris-matrix/harris-matrix-dating-d2-t0004"} +{"id": "harris-matrix-errors-d2-t0005", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "seed": 5, "title": "Impossible relations among 13 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts, 20 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 19, "path": "tasks/harris-matrix/harris-matrix-errors-d2-t0005"} +{"id": "harris-matrix-reduction-d2-t0006", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "seed": 6, "title": "Reduced matrix for 13 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts, 15 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 15, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-t0006"} +{"id": "harris-matrix-sequence-d2-t0007", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "seed": 7, "title": "Stratigraphic sequence of 14 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 18, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-t0007"} +{"id": "harris-matrix-dating-d3-t0008", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "seed": 8, "title": "Dating 16 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order).", "checks": 21, "path": "tasks/harris-matrix/harris-matrix-dating-d3-t0008"} +{"id": "harris-matrix-errors-d3-t0009", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "seed": 9, "title": "Impossible relations among 19 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 24 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 25, "path": "tasks/harris-matrix/harris-matrix-errors-d3-t0009"} +{"id": "harris-matrix-reduction-d3-t0010", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "seed": 10, "title": "Reduced matrix for 19 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 31 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 21, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-t0010"} +{"id": "harris-matrix-sequence-d3-t0011", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "seed": 11, "title": "Stratigraphic sequence of 21 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once.", "checks": 26, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-t0011"} +{"id": "harris-matrix-dating-d1-t0012", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "seed": 12, "title": "Dating 8 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 6, "path": "tasks/harris-matrix/harris-matrix-dating-d1-t0012"} +{"id": "harris-matrix-errors-d1-t0013", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "seed": 13, "title": "Impossible relations among 8 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 14, "path": "tasks/harris-matrix/harris-matrix-errors-d1-t0013"} +{"id": "harris-matrix-reduction-d1-t0014", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "seed": 14, "title": "Reduced matrix for 8 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 10, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-t0014"} +{"id": "harris-matrix-sequence-d1-t0015", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "seed": 15, "title": "Stratigraphic sequence of 9 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 13, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-t0015"} +{"id": "harris-matrix-dating-d2-t0016", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "seed": 16, "title": "Dating 12 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (12 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 9, "path": "tasks/harris-matrix/harris-matrix-dating-d2-t0016"} +{"id": "harris-matrix-errors-d2-t0017", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "seed": 17, "title": "Impossible relations among 14 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 17 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 20, "path": "tasks/harris-matrix/harris-matrix-errors-d2-t0017"} +{"id": "harris-matrix-reduction-d2-t0018", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "seed": 18, "title": "Reduced matrix for 14 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 20 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 16, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-t0018"} +{"id": "harris-matrix-sequence-d2-t0019", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "seed": 19, "title": "Stratigraphic sequence of 13 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 17, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-t0019"} +{"id": "harris-matrix-dating-d3-t0020", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "seed": 20, "title": "Dating 17 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (17 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order).", "checks": 28, "path": "tasks/harris-matrix/harris-matrix-dating-d3-t0020"} +{"id": "harris-matrix-errors-d3-t0021", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "seed": 21, "title": "Impossible relations among 19 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 28 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 25, "path": "tasks/harris-matrix/harris-matrix-errors-d3-t0021"} +{"id": "harris-matrix-reduction-d3-t0022", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "seed": 22, "title": "Reduced matrix for 21 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts, 34 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 23, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-t0022"} +{"id": "harris-matrix-sequence-d3-t0023", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "seed": 23, "title": "Stratigraphic sequence of 21 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once.", "checks": 26, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-t0023"} +{"id": "harris-matrix-dating-d1-t0024", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "seed": 24, "title": "Dating 9 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 9, "path": "tasks/harris-matrix/harris-matrix-dating-d1-t0024"} +{"id": "harris-matrix-errors-d1-t0025", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "seed": 25, "title": "Impossible relations among 8 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 14, "path": "tasks/harris-matrix/harris-matrix-errors-d1-t0025"} +{"id": "harris-matrix-reduction-d1-t0026", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "seed": 26, "title": "Reduced matrix for 8 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 12 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 10, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-t0026"} +{"id": "harris-matrix-sequence-d1-t0027", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "seed": 27, "title": "Stratigraphic sequence of 9 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 13, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-t0027"} +{"id": "harris-matrix-dating-d2-t0028", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "seed": 28, "title": "Dating 14 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 11, "path": "tasks/harris-matrix/harris-matrix-dating-d2-t0028"} +{"id": "harris-matrix-errors-d2-t0029", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "seed": 29, "title": "Impossible relations among 14 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 20 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 20, "path": "tasks/harris-matrix/harris-matrix-errors-d2-t0029"} +{"id": "harris-matrix-reduction-d2-t0030", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "seed": 30, "title": "Reduced matrix for 15 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (15 contexts, 19 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 17, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-t0030"} +{"id": "harris-matrix-sequence-d2-t0031", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "seed": 31, "title": "Stratigraphic sequence of 16 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 20, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-t0031"} +{"id": "harris-matrix-dating-d3-t0032", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "seed": 32, "title": "Dating 18 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (18 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order).", "checks": 23, "path": "tasks/harris-matrix/harris-matrix-dating-d3-t0032"} +{"id": "harris-matrix-errors-d3-t0033", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "seed": 33, "title": "Impossible relations among 19 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 25 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 25, "path": "tasks/harris-matrix/harris-matrix-errors-d3-t0033"} +{"id": "harris-matrix-reduction-d3-t0034", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "seed": 34, "title": "Reduced matrix for 19 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 26 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 21, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-t0034"} +{"id": "harris-matrix-sequence-d3-t0035", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "seed": 35, "title": "Stratigraphic sequence of 21 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once.", "checks": 26, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-t0035"} +{"id": "harris-matrix-dating-d1-t0036", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "seed": 36, "title": "Dating 9 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 5, "path": "tasks/harris-matrix/harris-matrix-dating-d1-t0036"} +{"id": "harris-matrix-errors-d1-t0037", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "seed": 37, "title": "Impossible relations among 8 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 12 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 14, "path": "tasks/harris-matrix/harris-matrix-errors-d1-t0037"} +{"id": "harris-matrix-reduction-d1-t0038", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "seed": 38, "title": "Reduced matrix for 8 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 9 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 10, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-t0038"} +{"id": "harris-matrix-sequence-d1-t0039", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "seed": 39, "title": "Stratigraphic sequence of 8 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 12, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-t0039"} +{"id": "harris-matrix-dating-d2-t0040", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "seed": 40, "title": "Dating 14 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 11, "path": "tasks/harris-matrix/harris-matrix-dating-d2-t0040"} +{"id": "harris-matrix-errors-d2-t0041", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "seed": 41, "title": "Impossible relations among 14 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 20 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 20, "path": "tasks/harris-matrix/harris-matrix-errors-d2-t0041"} +{"id": "harris-matrix-reduction-d2-t0042", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "seed": 42, "title": "Reduced matrix for 15 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (15 contexts, 21 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 17, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-t0042"} +{"id": "harris-matrix-sequence-d2-t0043", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "seed": 43, "title": "Stratigraphic sequence of 14 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 18, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-t0043"} +{"id": "harris-matrix-dating-d3-t0044", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "seed": 44, "title": "Dating 16 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order).", "checks": 17, "path": "tasks/harris-matrix/harris-matrix-dating-d3-t0044"} +{"id": "harris-matrix-errors-d3-t0045", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "seed": 45, "title": "Impossible relations among 19 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 27 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 25, "path": "tasks/harris-matrix/harris-matrix-errors-d3-t0045"} +{"id": "harris-matrix-reduction-d3-t0046", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "seed": 46, "title": "Reduced matrix for 21 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts, 28 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 23, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-t0046"} +{"id": "harris-matrix-sequence-d3-t0047", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "seed": 47, "title": "Stratigraphic sequence of 20 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (20 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once.", "checks": 25, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-t0047"} +{"id": "harris-matrix-dating-d1-t0048", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "seed": 48, "title": "Dating 9 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 8, "path": "tasks/harris-matrix/harris-matrix-dating-d1-t0048"} +{"id": "harris-matrix-errors-d1-t0049", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "seed": 49, "title": "Impossible relations among 8 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 13 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 14, "path": "tasks/harris-matrix/harris-matrix-errors-d1-t0049"} +{"id": "harris-matrix-reduction-d1-t0050", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "seed": 50, "title": "Reduced matrix for 9 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 11, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-t0050"} +{"id": "harris-matrix-sequence-d1-t0051", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "seed": 51, "title": "Stratigraphic sequence of 9 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 13, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-t0051"} +{"id": "harris-matrix-dating-d2-t0052", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "seed": 52, "title": "Dating 15 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (15 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 9, "path": "tasks/harris-matrix/harris-matrix-dating-d2-t0052"} +{"id": "harris-matrix-errors-d2-t0053", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "seed": 53, "title": "Impossible relations among 13 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts, 17 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 19, "path": "tasks/harris-matrix/harris-matrix-errors-d2-t0053"} +{"id": "harris-matrix-reduction-d2-t0054", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "seed": 54, "title": "Reduced matrix for 16 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts, 21 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 18, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-t0054"} +{"id": "harris-matrix-sequence-d2-t0055", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "seed": 55, "title": "Stratigraphic sequence of 14 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 18, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-t0055"} +{"id": "harris-matrix-dating-d3-t0056", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "seed": 56, "title": "Dating 16 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order).", "checks": 16, "path": "tasks/harris-matrix/harris-matrix-dating-d3-t0056"} +{"id": "harris-matrix-errors-d3-t0057", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "seed": 57, "title": "Impossible relations among 19 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 29 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 25, "path": "tasks/harris-matrix/harris-matrix-errors-d3-t0057"} +{"id": "harris-matrix-reduction-d3-t0058", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "seed": 58, "title": "Reduced matrix for 21 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts, 30 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 23, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-t0058"} +{"id": "harris-matrix-sequence-d3-t0059", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "seed": 59, "title": "Stratigraphic sequence of 19 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once.", "checks": 24, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-t0059"} +{"id": "harris-matrix-dating-d1-t0060", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "seed": 60, "title": "Dating 9 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 6, "path": "tasks/harris-matrix/harris-matrix-dating-d1-t0060"} +{"id": "harris-matrix-errors-d1-t0061", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "seed": 61, "title": "Impossible relations among 8 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 14, "path": "tasks/harris-matrix/harris-matrix-errors-d1-t0061"} +{"id": "harris-matrix-reduction-d1-t0062", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "seed": 62, "title": "Reduced matrix for 9 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 11, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-t0062"} +{"id": "harris-matrix-sequence-d1-t0063", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "seed": 63, "title": "Stratigraphic sequence of 9 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 13, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-t0063"} +{"id": "harris-matrix-dating-d2-t0064", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "seed": 64, "title": "Dating 15 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (15 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 10, "path": "tasks/harris-matrix/harris-matrix-dating-d2-t0064"} +{"id": "harris-matrix-errors-d2-t0065", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "seed": 65, "title": "Impossible relations among 13 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts, 18 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 19, "path": "tasks/harris-matrix/harris-matrix-errors-d2-t0065"} +{"id": "harris-matrix-reduction-d2-t0066", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "seed": 66, "title": "Reduced matrix for 13 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts, 16 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 15, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-t0066"} +{"id": "harris-matrix-sequence-d2-t0067", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "seed": 67, "title": "Stratigraphic sequence of 14 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 18, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-t0067"} +{"id": "harris-matrix-dating-d3-t0068", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "seed": 68, "title": "Dating 16 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order).", "checks": 25, "path": "tasks/harris-matrix/harris-matrix-dating-d3-t0068"} +{"id": "harris-matrix-errors-d3-t0069", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "seed": 69, "title": "Impossible relations among 19 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 30 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 25, "path": "tasks/harris-matrix/harris-matrix-errors-d3-t0069"} +{"id": "harris-matrix-reduction-d3-t0070", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "seed": 70, "title": "Reduced matrix for 21 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts, 33 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 23, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-t0070"} +{"id": "harris-matrix-sequence-d3-t0071", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "seed": 71, "title": "Stratigraphic sequence of 20 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (20 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once.", "checks": 25, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-t0071"} +{"id": "harris-matrix-dating-d1-t0072", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "seed": 72, "title": "Dating 9 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 9, "path": "tasks/harris-matrix/harris-matrix-dating-d1-t0072"} +{"id": "harris-matrix-errors-d1-t0073", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "seed": 73, "title": "Impossible relations among 8 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 12 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 14, "path": "tasks/harris-matrix/harris-matrix-errors-d1-t0073"} +{"id": "harris-matrix-reduction-d1-t0074", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "seed": 74, "title": "Reduced matrix for 8 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 9 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 10, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-t0074"} +{"id": "harris-matrix-sequence-d1-t0075", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "seed": 75, "title": "Stratigraphic sequence of 9 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 13, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-t0075"} +{"id": "harris-matrix-dating-d2-t0076", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "seed": 76, "title": "Dating 15 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (15 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).", "checks": 14, "path": "tasks/harris-matrix/harris-matrix-dating-d2-t0076"} +{"id": "harris-matrix-errors-d2-t0077", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "seed": 77, "title": "Impossible relations among 13 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts, 19 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 19, "path": "tasks/harris-matrix/harris-matrix-errors-d2-t0077"} +{"id": "harris-matrix-reduction-d2-t0078", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "seed": 78, "title": "Reduced matrix for 13 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts, 18 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 15, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-t0078"} +{"id": "harris-matrix-sequence-d2-t0079", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "seed": 79, "title": "Stratigraphic sequence of 16 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 20, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-t0079"} +{"id": "harris-matrix-dating-d3-t0080", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "seed": 80, "title": "Dating 18 contexts from their finds", "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (18 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order).", "checks": 23, "path": "tasks/harris-matrix/harris-matrix-dating-d3-t0080"} +{"id": "harris-matrix-errors-d3-t0081", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "seed": 81, "title": "Impossible relations among 19 contexts", "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 27 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.", "checks": 25, "path": "tasks/harris-matrix/harris-matrix-errors-d3-t0081"} +{"id": "harris-matrix-reduction-d3-t0082", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "seed": 82, "title": "Reduced matrix for 20 contexts", "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (20 contexts, 26 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them.", "checks": 22, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-t0082"} +{"id": "harris-matrix-sequence-d3-t0083", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "seed": 83, "title": "Stratigraphic sequence of 19 contexts", "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once.", "checks": 24, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-t0083"} diff --git a/data/life-table/eval.jsonl b/data/life-table/eval.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..a5fce322798ebe32a84f5c1f95d8f50a85e0dcbc --- /dev/null +++ b/data/life-table/eval.jsonl @@ -0,0 +1,24 @@ +{"id": "life-table-age-structure-d1-e0000", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "seed": 10000, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Aldermark at the end of 2015 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/life-table/life-table-age-structure-d1-e0000"} +{"id": "life-table-fertility-d1-e0001", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "seed": 10001, "title": "Fertility measures, 1 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Dunholt in 2011 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d1-e0001"} +{"id": "life-table-life-table-d1-e0002", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "seed": 10002, "title": "Abridged life table, 8 age groups", "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2022 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/life-table/life-table-life-table-d1-e0002"} +{"id": "life-table-standardisation-d1-e0003", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "seed": 10003, "title": "Standardised death rates, 3 regions", "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2008 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Aldermark (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/life-table/life-table-standardisation-d1-e0003"} +{"id": "life-table-age-structure-d2-e0004", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "seed": 10004, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Brinmoor at the end of 2020 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/life-table/life-table-age-structure-d2-e0004"} +{"id": "life-table-fertility-d2-e0005", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "seed": 10005, "title": "Fertility measures, 4 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2004 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d2-e0005"} +{"id": "life-table-life-table-d2-e0006", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "seed": 10006, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2012 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/life-table/life-table-life-table-d2-e0006"} +{"id": "life-table-standardisation-d2-e0007", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "seed": 10007, "title": "Standardised death rates, 4 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2018 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `cancer` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Hollinside (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/life-table/life-table-standardisation-d2-e0007"} +{"id": "life-table-age-structure-d3-e0008", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "seed": 10008, "title": "Age structure, 5 area(s)", "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2016 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/life-table/life-table-age-structure-d3-e0008"} +{"id": "life-table-fertility-d3-e0009", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "seed": 10009, "title": "Fertility measures, 5 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2011 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/life-table/life-table-fertility-d3-e0009"} +{"id": "life-table-life-table-d3-e0010", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "seed": 10010, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2016 population by age group and sex. `deaths.csv` gives the deaths in 2015, 2016 and 2017 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/life-table/life-table-life-table-d3-e0010"} +{"id": "life-table-standardisation-d3-e0011", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "seed": 10011, "title": "Standardised death rates, 5 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2015 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Aldermark (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/life-table/life-table-standardisation-d3-e0011"} +{"id": "life-table-age-structure-d1-e0012", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "seed": 10012, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Aldermark at the end of 2013 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/life-table/life-table-age-structure-d1-e0012"} +{"id": "life-table-fertility-d1-e0013", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "seed": 10013, "title": "Fertility measures, 1 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Calderfell in 2005 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d1-e0013"} +{"id": "life-table-life-table-d1-e0014", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "seed": 10014, "title": "Abridged life table, 8 age groups", "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2020 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/life-table/life-table-life-table-d1-e0014"} +{"id": "life-table-standardisation-d1-e0015", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "seed": 10015, "title": "Standardised death rates, 3 regions", "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2015 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Farrowby (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/life-table/life-table-standardisation-d1-e0015"} +{"id": "life-table-age-structure-d2-e0016", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "seed": 10016, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Glenrath at the end of 2011 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/life-table/life-table-age-structure-d2-e0016"} +{"id": "life-table-fertility-d2-e0017", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "seed": 10017, "title": "Fertility measures, 4 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2007 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d2-e0017"} +{"id": "life-table-life-table-d2-e0018", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "seed": 10018, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2014 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/life-table/life-table-life-table-d2-e0018"} +{"id": "life-table-standardisation-d2-e0019", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "seed": 10019, "title": "Standardised death rates, 4 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2016 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `respiratory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Eskwater (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/life-table/life-table-standardisation-d2-e0019"} +{"id": "life-table-age-structure-d3-e0020", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "seed": 10020, "title": "Age structure, 5 area(s)", "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2012 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/life-table/life-table-age-structure-d3-e0020"} +{"id": "life-table-fertility-d3-e0021", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "seed": 10021, "title": "Fertility measures, 5 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2012 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/life-table/life-table-fertility-d3-e0021"} +{"id": "life-table-life-table-d3-e0022", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "seed": 10022, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2019 population by age group and sex. `deaths.csv` gives the deaths in 2018, 2019 and 2020 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/life-table/life-table-life-table-d3-e0022"} +{"id": "life-table-standardisation-d3-e0023", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "seed": 10023, "title": "Standardised death rates, 5 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2016 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Glenrath (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/life-table/life-table-standardisation-d3-e0023"} diff --git a/data/life-table/train.jsonl b/data/life-table/train.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..1a748e7a0a9ed29e8467b7f5fb2384c4eea032e5 --- /dev/null +++ b/data/life-table/train.jsonl @@ -0,0 +1,84 @@ +{"id": "life-table-age-structure-d1-t0000", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "seed": 0, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Brinmoor at the end of 2011 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/life-table/life-table-age-structure-d1-t0000"} +{"id": "life-table-fertility-d1-t0001", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "seed": 1, "title": "Fertility measures, 1 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Aldermark in 2020 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d1-t0001"} +{"id": "life-table-life-table-d1-t0002", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "seed": 2, "title": "Abridged life table, 8 age groups", "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2021 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/life-table/life-table-life-table-d1-t0002"} +{"id": "life-table-standardisation-d1-t0003", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "seed": 3, "title": "Standardised death rates, 3 regions", "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2022 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Dunholt (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/life-table/life-table-standardisation-d1-t0003"} +{"id": "life-table-age-structure-d2-t0004", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "seed": 4, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Brinmoor at the end of 2015 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/life-table/life-table-age-structure-d2-t0004"} +{"id": "life-table-fertility-d2-t0005", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "seed": 5, "title": "Fertility measures, 4 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2018 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d2-t0005"} +{"id": "life-table-life-table-d2-t0006", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "seed": 6, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2019 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/life-table/life-table-life-table-d2-t0006"} +{"id": "life-table-standardisation-d2-t0007", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "seed": 7, "title": "Standardised death rates, 4 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2010 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Dunholt (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/life-table/life-table-standardisation-d2-t0007"} +{"id": "life-table-age-structure-d3-t0008", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "seed": 8, "title": "Age structure, 5 area(s)", "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2021 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/life-table/life-table-age-structure-d3-t0008"} +{"id": "life-table-fertility-d3-t0009", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "seed": 9, "title": "Fertility measures, 5 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2004 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/life-table/life-table-fertility-d3-t0009"} +{"id": "life-table-life-table-d3-t0010", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "seed": 10, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2016 population by age group and sex. `deaths.csv` gives the deaths in 2015, 2016 and 2017 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/life-table/life-table-life-table-d3-t0010"} +{"id": "life-table-standardisation-d3-t0011", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "seed": 11, "title": "Standardised death rates, 5 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2021 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `cancer` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Eskwater (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/life-table/life-table-standardisation-d3-t0011"} +{"id": "life-table-age-structure-d1-t0012", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "seed": 12, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Farrowby at the end of 2020 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/life-table/life-table-age-structure-d1-t0012"} +{"id": "life-table-fertility-d1-t0013", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "seed": 13, "title": "Fertility measures, 1 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Glenrath in 2004 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d1-t0013"} +{"id": "life-table-life-table-d1-t0014", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "seed": 14, "title": "Abridged life table, 8 age groups", "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2016 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/life-table/life-table-life-table-d1-t0014"} +{"id": "life-table-standardisation-d1-t0015", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "seed": 15, "title": "Standardised death rates, 3 regions", "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2022 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Farrowby (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/life-table/life-table-standardisation-d1-t0015"} +{"id": "life-table-age-structure-d2-t0016", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "seed": 16, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Eskwater at the end of 2024 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/life-table/life-table-age-structure-d2-t0016"} +{"id": "life-table-fertility-d2-t0017", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "seed": 17, "title": "Fertility measures, 4 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2011 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d2-t0017"} +{"id": "life-table-life-table-d2-t0018", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "seed": 18, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2011 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/life-table/life-table-life-table-d2-t0018"} +{"id": "life-table-standardisation-d2-t0019", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "seed": 19, "title": "Standardised death rates, 4 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2020 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `respiratory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Dunholt (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/life-table/life-table-standardisation-d2-t0019"} +{"id": "life-table-age-structure-d3-t0020", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "seed": 20, "title": "Age structure, 5 area(s)", "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2015 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/life-table/life-table-age-structure-d3-t0020"} +{"id": "life-table-fertility-d3-t0021", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "seed": 21, "title": "Fertility measures, 5 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2016 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/life-table/life-table-fertility-d3-t0021"} +{"id": "life-table-life-table-d3-t0022", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "seed": 22, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2022 population by age group and sex. `deaths.csv` gives the deaths in 2021, 2022 and 2023 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/life-table/life-table-life-table-d3-t0022"} +{"id": "life-table-standardisation-d3-t0023", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "seed": 23, "title": "Standardised death rates, 5 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2014 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Calderfell (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/life-table/life-table-standardisation-d3-t0023"} +{"id": "life-table-age-structure-d1-t0024", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "seed": 24, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Glenrath at the end of 2016 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/life-table/life-table-age-structure-d1-t0024"} +{"id": "life-table-fertility-d1-t0025", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "seed": 25, "title": "Fertility measures, 1 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Glenrath in 2013 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d1-t0025"} +{"id": "life-table-life-table-d1-t0026", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "seed": 26, "title": "Abridged life table, 8 age groups", "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2011 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/life-table/life-table-life-table-d1-t0026"} +{"id": "life-table-standardisation-d1-t0027", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "seed": 27, "title": "Standardised death rates, 3 regions", "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2012 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Dunholt (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/life-table/life-table-standardisation-d1-t0027"} +{"id": "life-table-age-structure-d2-t0028", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "seed": 28, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Eskwater at the end of 2011 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/life-table/life-table-age-structure-d2-t0028"} +{"id": "life-table-fertility-d2-t0029", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "seed": 29, "title": "Fertility measures, 4 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2013 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d2-t0029"} +{"id": "life-table-life-table-d2-t0030", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "seed": 30, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2016 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/life-table/life-table-life-table-d2-t0030"} +{"id": "life-table-standardisation-d2-t0031", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "seed": 31, "title": "Standardised death rates, 4 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2009 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Hollinside (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/life-table/life-table-standardisation-d2-t0031"} +{"id": "life-table-age-structure-d3-t0032", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "seed": 32, "title": "Age structure, 5 area(s)", "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2023 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/life-table/life-table-age-structure-d3-t0032"} +{"id": "life-table-fertility-d3-t0033", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "seed": 33, "title": "Fertility measures, 5 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2010 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/life-table/life-table-fertility-d3-t0033"} +{"id": "life-table-life-table-d3-t0034", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "seed": 34, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2015 population by age group and sex. `deaths.csv` gives the deaths in 2014, 2015 and 2016 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/life-table/life-table-life-table-d3-t0034"} +{"id": "life-table-standardisation-d3-t0035", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "seed": 35, "title": "Standardised death rates, 5 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2008 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `cancer` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Glenrath (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/life-table/life-table-standardisation-d3-t0035"} +{"id": "life-table-age-structure-d1-t0036", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "seed": 36, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Aldermark at the end of 2021 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/life-table/life-table-age-structure-d1-t0036"} +{"id": "life-table-fertility-d1-t0037", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "seed": 37, "title": "Fertility measures, 1 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Glenrath in 2017 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d1-t0037"} +{"id": "life-table-life-table-d1-t0038", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "seed": 38, "title": "Abridged life table, 8 age groups", "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2010 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/life-table/life-table-life-table-d1-t0038"} +{"id": "life-table-standardisation-d1-t0039", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "seed": 39, "title": "Standardised death rates, 3 regions", "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2017 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Farrowby (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/life-table/life-table-standardisation-d1-t0039"} +{"id": "life-table-age-structure-d2-t0040", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "seed": 40, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Hollinside at the end of 2016 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/life-table/life-table-age-structure-d2-t0040"} +{"id": "life-table-fertility-d2-t0041", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "seed": 41, "title": "Fertility measures, 4 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2009 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d2-t0041"} +{"id": "life-table-life-table-d2-t0042", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "seed": 42, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2009 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/life-table/life-table-life-table-d2-t0042"} +{"id": "life-table-standardisation-d2-t0043", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "seed": 43, "title": "Standardised death rates, 4 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2011 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Glenrath (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/life-table/life-table-standardisation-d2-t0043"} +{"id": "life-table-age-structure-d3-t0044", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "seed": 44, "title": "Age structure, 5 area(s)", "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2022 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/life-table/life-table-age-structure-d3-t0044"} +{"id": "life-table-fertility-d3-t0045", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "seed": 45, "title": "Fertility measures, 5 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2022 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/life-table/life-table-fertility-d3-t0045"} +{"id": "life-table-life-table-d3-t0046", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "seed": 46, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2007 population by age group and sex. `deaths.csv` gives the deaths in 2006, 2007 and 2008 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/life-table/life-table-life-table-d3-t0046"} +{"id": "life-table-standardisation-d3-t0047", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "seed": 47, "title": "Standardised death rates, 5 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2018 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `respiratory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Brinmoor (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/life-table/life-table-standardisation-d3-t0047"} +{"id": "life-table-age-structure-d1-t0048", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "seed": 48, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Dunholt at the end of 2013 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/life-table/life-table-age-structure-d1-t0048"} +{"id": "life-table-fertility-d1-t0049", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "seed": 49, "title": "Fertility measures, 1 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Hollinside in 2021 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d1-t0049"} +{"id": "life-table-life-table-d1-t0050", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "seed": 50, "title": "Abridged life table, 8 age groups", "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2005 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/life-table/life-table-life-table-d1-t0050"} +{"id": "life-table-standardisation-d1-t0051", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "seed": 51, "title": "Standardised death rates, 3 regions", "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2021 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Farrowby (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/life-table/life-table-standardisation-d1-t0051"} +{"id": "life-table-age-structure-d2-t0052", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "seed": 52, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Brinmoor at the end of 2014 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/life-table/life-table-age-structure-d2-t0052"} +{"id": "life-table-fertility-d2-t0053", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "seed": 53, "title": "Fertility measures, 4 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2018 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d2-t0053"} +{"id": "life-table-life-table-d2-t0054", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "seed": 54, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2015 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/life-table/life-table-life-table-d2-t0054"} +{"id": "life-table-standardisation-d2-t0055", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "seed": 55, "title": "Standardised death rates, 4 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2011 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Calderfell (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/life-table/life-table-standardisation-d2-t0055"} +{"id": "life-table-age-structure-d3-t0056", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "seed": 56, "title": "Age structure, 5 area(s)", "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2011 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/life-table/life-table-age-structure-d3-t0056"} +{"id": "life-table-fertility-d3-t0057", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "seed": 57, "title": "Fertility measures, 5 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2008 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/life-table/life-table-fertility-d3-t0057"} +{"id": "life-table-life-table-d3-t0058", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "seed": 58, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2013 population by age group and sex. `deaths.csv` gives the deaths in 2012, 2013 and 2014 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/life-table/life-table-life-table-d3-t0058"} +{"id": "life-table-standardisation-d3-t0059", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "seed": 59, "title": "Standardised death rates, 5 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2022 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `cancer` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Calderfell (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/life-table/life-table-standardisation-d3-t0059"} +{"id": "life-table-age-structure-d1-t0060", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "seed": 60, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Glenrath at the end of 2014 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/life-table/life-table-age-structure-d1-t0060"} +{"id": "life-table-fertility-d1-t0061", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "seed": 61, "title": "Fertility measures, 1 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Hollinside in 2022 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d1-t0061"} +{"id": "life-table-life-table-d1-t0062", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "seed": 62, "title": "Abridged life table, 8 age groups", "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2021 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/life-table/life-table-life-table-d1-t0062"} +{"id": "life-table-standardisation-d1-t0063", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "seed": 63, "title": "Standardised death rates, 3 regions", "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2012 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Brinmoor (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/life-table/life-table-standardisation-d1-t0063"} +{"id": "life-table-age-structure-d2-t0064", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "seed": 64, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Hollinside at the end of 2016 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/life-table/life-table-age-structure-d2-t0064"} +{"id": "life-table-fertility-d2-t0065", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "seed": 65, "title": "Fertility measures, 4 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2023 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d2-t0065"} +{"id": "life-table-life-table-d2-t0066", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "seed": 66, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2011 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/life-table/life-table-life-table-d2-t0066"} +{"id": "life-table-standardisation-d2-t0067", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "seed": 67, "title": "Standardised death rates, 4 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2020 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `cancer` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Hollinside (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/life-table/life-table-standardisation-d2-t0067"} +{"id": "life-table-age-structure-d3-t0068", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "seed": 68, "title": "Age structure, 5 area(s)", "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2022 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/life-table/life-table-age-structure-d3-t0068"} +{"id": "life-table-fertility-d3-t0069", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "seed": 69, "title": "Fertility measures, 5 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2017 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/life-table/life-table-fertility-d3-t0069"} +{"id": "life-table-life-table-d3-t0070", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "seed": 70, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2016 population by age group and sex. `deaths.csv` gives the deaths in 2015, 2016 and 2017 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/life-table/life-table-life-table-d3-t0070"} +{"id": "life-table-standardisation-d3-t0071", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "seed": 71, "title": "Standardised death rates, 5 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2014 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Eskwater (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/life-table/life-table-standardisation-d3-t0071"} +{"id": "life-table-age-structure-d1-t0072", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "seed": 72, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Eskwater at the end of 2022 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/life-table/life-table-age-structure-d1-t0072"} +{"id": "life-table-fertility-d1-t0073", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "seed": 73, "title": "Fertility measures, 1 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Hollinside in 2011 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d1-t0073"} +{"id": "life-table-life-table-d1-t0074", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "seed": 74, "title": "Abridged life table, 8 age groups", "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2006 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/life-table/life-table-life-table-d1-t0074"} +{"id": "life-table-standardisation-d1-t0075", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "seed": 75, "title": "Standardised death rates, 3 regions", "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2022 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Hollinside (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/life-table/life-table-standardisation-d1-t0075"} +{"id": "life-table-age-structure-d2-t0076", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "seed": 76, "title": "Age structure, 1 area(s)", "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Farrowby at the end of 2018 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/life-table/life-table-age-structure-d2-t0076"} +{"id": "life-table-fertility-d2-t0077", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "seed": 77, "title": "Fertility measures, 4 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2007 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/life-table/life-table-fertility-d2-t0077"} +{"id": "life-table-life-table-d2-t0078", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "seed": 78, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2007 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/life-table/life-table-life-table-d2-t0078"} +{"id": "life-table-standardisation-d2-t0079", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "seed": 79, "title": "Standardised death rates, 4 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2011 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `cancer` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Brinmoor (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/life-table/life-table-standardisation-d2-t0079"} +{"id": "life-table-age-structure-d3-t0080", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "seed": 80, "title": "Age structure, 5 area(s)", "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2020 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/life-table/life-table-age-structure-d3-t0080"} +{"id": "life-table-fertility-d3-t0081", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "seed": 81, "title": "Fertility measures, 5 area(s)", "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2015 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/life-table/life-table-fertility-d3-t0081"} +{"id": "life-table-life-table-d3-t0082", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "seed": 82, "title": "Abridged life table, 19 age groups", "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2017 population by age group and sex. `deaths.csv` gives the deaths in 2016, 2017 and 2018 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/life-table/life-table-life-table-d3-t0082"} +{"id": "life-table-standardisation-d3-t0083", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "seed": 83, "title": "Standardised death rates, 5 regions", "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2008 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `external` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Hollinside (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/life-table/life-table-standardisation-d3-t0083"} diff --git a/data/means-test/eval.jsonl b/data/means-test/eval.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..90b07ca52fa7734a91a994eb721526fca393950b --- /dev/null +++ b/data/means-test/eval.jsonl @@ -0,0 +1,24 @@ +{"id": "means-test-change-d1-e0000", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "seed": 10000, "title": "Prorate 3 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-03 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-change-d1-e0000"} +{"id": "means-test-entitlement-d1-e0001", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "seed": 10001, "title": "Assess 4 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/means-test/means-test-entitlement-d1-e0001"} +{"id": "means-test-overpayment-d1-e0002", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "seed": 10002, "title": "Work out overpayments for 3 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/means-test/means-test-overpayment-d1-e0002"} +{"id": "means-test-review-d1-e0003", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "seed": 10003, "title": "Review 5 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-review-d1-e0003"} +{"id": "means-test-change-d2-e0004", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "seed": 10004, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-05 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d2-e0004"} +{"id": "means-test-entitlement-d2-e0005", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "seed": 10005, "title": "Assess 6 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/means-test/means-test-entitlement-d2-e0005"} +{"id": "means-test-overpayment-d2-e0006", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "seed": 10006, "title": "Work out overpayments for 4 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/means-test/means-test-overpayment-d2-e0006"} +{"id": "means-test-review-d2-e0007", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "seed": 10007, "title": "Review 7 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 19, "path": "tasks/means-test/means-test-review-d2-e0007"} +{"id": "means-test-change-d3-e0008", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "seed": 10008, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-10 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d3-e0008"} +{"id": "means-test-entitlement-d3-e0009", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "seed": 10009, "title": "Assess 7 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/means-test/means-test-entitlement-d3-e0009"} +{"id": "means-test-overpayment-d3-e0010", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "seed": 10010, "title": "Work out overpayments for 5 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/means-test/means-test-overpayment-d3-e0010"} +{"id": "means-test-review-d3-e0011", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "seed": 10011, "title": "Review 9 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/means-test/means-test-review-d3-e0011"} +{"id": "means-test-change-d1-e0012", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "seed": 10012, "title": "Prorate 3 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-05 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-change-d1-e0012"} +{"id": "means-test-entitlement-d1-e0013", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "seed": 10013, "title": "Assess 4 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/means-test/means-test-entitlement-d1-e0013"} +{"id": "means-test-overpayment-d1-e0014", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "seed": 10014, "title": "Work out overpayments for 3 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/means-test/means-test-overpayment-d1-e0014"} +{"id": "means-test-review-d1-e0015", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "seed": 10015, "title": "Review 5 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-review-d1-e0015"} +{"id": "means-test-change-d2-e0016", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "seed": 10016, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-03 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d2-e0016"} +{"id": "means-test-entitlement-d2-e0017", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "seed": 10017, "title": "Assess 6 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/means-test/means-test-entitlement-d2-e0017"} +{"id": "means-test-overpayment-d2-e0018", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "seed": 10018, "title": "Work out overpayments for 4 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/means-test/means-test-overpayment-d2-e0018"} +{"id": "means-test-review-d2-e0019", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "seed": 10019, "title": "Review 7 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 19, "path": "tasks/means-test/means-test-review-d2-e0019"} +{"id": "means-test-change-d3-e0020", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "seed": 10020, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-03 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d3-e0020"} +{"id": "means-test-entitlement-d3-e0021", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "seed": 10021, "title": "Assess 7 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/means-test/means-test-entitlement-d3-e0021"} +{"id": "means-test-overpayment-d3-e0022", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "seed": 10022, "title": "Work out overpayments for 5 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/means-test/means-test-overpayment-d3-e0022"} +{"id": "means-test-review-d3-e0023", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "seed": 10023, "title": "Review 9 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/means-test/means-test-review-d3-e0023"} diff --git a/data/means-test/train.jsonl b/data/means-test/train.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..5db6c244d8425ba4b00f066f0f9e3be69ef6a860 --- /dev/null +++ b/data/means-test/train.jsonl @@ -0,0 +1,84 @@ +{"id": "means-test-change-d1-t0000", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "seed": 0, "title": "Prorate 3 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-07 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-change-d1-t0000"} +{"id": "means-test-entitlement-d1-t0001", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "seed": 1, "title": "Assess 4 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/means-test/means-test-entitlement-d1-t0001"} +{"id": "means-test-overpayment-d1-t0002", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "seed": 2, "title": "Work out overpayments for 3 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/means-test/means-test-overpayment-d1-t0002"} +{"id": "means-test-review-d1-t0003", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "seed": 3, "title": "Review 5 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-review-d1-t0003"} +{"id": "means-test-change-d2-t0004", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "seed": 4, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-10 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d2-t0004"} +{"id": "means-test-entitlement-d2-t0005", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "seed": 5, "title": "Assess 6 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/means-test/means-test-entitlement-d2-t0005"} +{"id": "means-test-overpayment-d2-t0006", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "seed": 6, "title": "Work out overpayments for 4 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/means-test/means-test-overpayment-d2-t0006"} +{"id": "means-test-review-d2-t0007", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "seed": 7, "title": "Review 7 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 19, "path": "tasks/means-test/means-test-review-d2-t0007"} +{"id": "means-test-change-d3-t0008", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "seed": 8, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-09 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d3-t0008"} +{"id": "means-test-entitlement-d3-t0009", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "seed": 9, "title": "Assess 7 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/means-test/means-test-entitlement-d3-t0009"} +{"id": "means-test-overpayment-d3-t0010", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "seed": 10, "title": "Work out overpayments for 5 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/means-test/means-test-overpayment-d3-t0010"} +{"id": "means-test-review-d3-t0011", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "seed": 11, "title": "Review 9 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/means-test/means-test-review-d3-t0011"} +{"id": "means-test-change-d1-t0012", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "seed": 12, "title": "Prorate 3 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-06 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-change-d1-t0012"} +{"id": "means-test-entitlement-d1-t0013", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "seed": 13, "title": "Assess 4 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/means-test/means-test-entitlement-d1-t0013"} +{"id": "means-test-overpayment-d1-t0014", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "seed": 14, "title": "Work out overpayments for 3 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/means-test/means-test-overpayment-d1-t0014"} +{"id": "means-test-review-d1-t0015", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "seed": 15, "title": "Review 5 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-review-d1-t0015"} +{"id": "means-test-change-d2-t0016", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "seed": 16, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-02 (28 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d2-t0016"} +{"id": "means-test-entitlement-d2-t0017", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "seed": 17, "title": "Assess 6 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/means-test/means-test-entitlement-d2-t0017"} +{"id": "means-test-overpayment-d2-t0018", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "seed": 18, "title": "Work out overpayments for 4 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/means-test/means-test-overpayment-d2-t0018"} +{"id": "means-test-review-d2-t0019", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "seed": 19, "title": "Review 7 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 19, "path": "tasks/means-test/means-test-review-d2-t0019"} +{"id": "means-test-change-d3-t0020", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "seed": 20, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-04 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d3-t0020"} +{"id": "means-test-entitlement-d3-t0021", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "seed": 21, "title": "Assess 7 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/means-test/means-test-entitlement-d3-t0021"} +{"id": "means-test-overpayment-d3-t0022", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "seed": 22, "title": "Work out overpayments for 5 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/means-test/means-test-overpayment-d3-t0022"} +{"id": "means-test-review-d3-t0023", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "seed": 23, "title": "Review 9 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/means-test/means-test-review-d3-t0023"} +{"id": "means-test-change-d1-t0024", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "seed": 24, "title": "Prorate 3 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-07 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-change-d1-t0024"} +{"id": "means-test-entitlement-d1-t0025", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "seed": 25, "title": "Assess 4 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/means-test/means-test-entitlement-d1-t0025"} +{"id": "means-test-overpayment-d1-t0026", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "seed": 26, "title": "Work out overpayments for 3 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/means-test/means-test-overpayment-d1-t0026"} +{"id": "means-test-review-d1-t0027", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "seed": 27, "title": "Review 5 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-review-d1-t0027"} +{"id": "means-test-change-d2-t0028", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "seed": 28, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-06 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d2-t0028"} +{"id": "means-test-entitlement-d2-t0029", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "seed": 29, "title": "Assess 6 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/means-test/means-test-entitlement-d2-t0029"} +{"id": "means-test-overpayment-d2-t0030", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "seed": 30, "title": "Work out overpayments for 4 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/means-test/means-test-overpayment-d2-t0030"} +{"id": "means-test-review-d2-t0031", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "seed": 31, "title": "Review 7 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 19, "path": "tasks/means-test/means-test-review-d2-t0031"} +{"id": "means-test-change-d3-t0032", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "seed": 32, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-05 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d3-t0032"} +{"id": "means-test-entitlement-d3-t0033", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "seed": 33, "title": "Assess 7 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/means-test/means-test-entitlement-d3-t0033"} +{"id": "means-test-overpayment-d3-t0034", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "seed": 34, "title": "Work out overpayments for 5 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/means-test/means-test-overpayment-d3-t0034"} +{"id": "means-test-review-d3-t0035", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "seed": 35, "title": "Review 9 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/means-test/means-test-review-d3-t0035"} +{"id": "means-test-change-d1-t0036", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "seed": 36, "title": "Prorate 3 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-01 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-change-d1-t0036"} +{"id": "means-test-entitlement-d1-t0037", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "seed": 37, "title": "Assess 4 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/means-test/means-test-entitlement-d1-t0037"} +{"id": "means-test-overpayment-d1-t0038", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "seed": 38, "title": "Work out overpayments for 3 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/means-test/means-test-overpayment-d1-t0038"} +{"id": "means-test-review-d1-t0039", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "seed": 39, "title": "Review 5 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-review-d1-t0039"} +{"id": "means-test-change-d2-t0040", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "seed": 40, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-10 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d2-t0040"} +{"id": "means-test-entitlement-d2-t0041", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "seed": 41, "title": "Assess 6 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/means-test/means-test-entitlement-d2-t0041"} +{"id": "means-test-overpayment-d2-t0042", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "seed": 42, "title": "Work out overpayments for 4 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/means-test/means-test-overpayment-d2-t0042"} +{"id": "means-test-review-d2-t0043", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "seed": 43, "title": "Review 7 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 19, "path": "tasks/means-test/means-test-review-d2-t0043"} +{"id": "means-test-change-d3-t0044", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "seed": 44, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-05 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d3-t0044"} +{"id": "means-test-entitlement-d3-t0045", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "seed": 45, "title": "Assess 7 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/means-test/means-test-entitlement-d3-t0045"} +{"id": "means-test-overpayment-d3-t0046", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "seed": 46, "title": "Work out overpayments for 5 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/means-test/means-test-overpayment-d3-t0046"} +{"id": "means-test-review-d3-t0047", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "seed": 47, "title": "Review 9 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/means-test/means-test-review-d3-t0047"} +{"id": "means-test-change-d1-t0048", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "seed": 48, "title": "Prorate 3 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-02 (28 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-change-d1-t0048"} +{"id": "means-test-entitlement-d1-t0049", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "seed": 49, "title": "Assess 4 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/means-test/means-test-entitlement-d1-t0049"} +{"id": "means-test-overpayment-d1-t0050", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "seed": 50, "title": "Work out overpayments for 3 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/means-test/means-test-overpayment-d1-t0050"} +{"id": "means-test-review-d1-t0051", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "seed": 51, "title": "Review 5 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-review-d1-t0051"} +{"id": "means-test-change-d2-t0052", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "seed": 52, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-04 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d2-t0052"} +{"id": "means-test-entitlement-d2-t0053", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "seed": 53, "title": "Assess 6 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/means-test/means-test-entitlement-d2-t0053"} +{"id": "means-test-overpayment-d2-t0054", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "seed": 54, "title": "Work out overpayments for 4 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/means-test/means-test-overpayment-d2-t0054"} +{"id": "means-test-review-d2-t0055", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "seed": 55, "title": "Review 7 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 19, "path": "tasks/means-test/means-test-review-d2-t0055"} +{"id": "means-test-change-d3-t0056", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "seed": 56, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-09 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d3-t0056"} +{"id": "means-test-entitlement-d3-t0057", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "seed": 57, "title": "Assess 7 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/means-test/means-test-entitlement-d3-t0057"} +{"id": "means-test-overpayment-d3-t0058", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "seed": 58, "title": "Work out overpayments for 5 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/means-test/means-test-overpayment-d3-t0058"} +{"id": "means-test-review-d3-t0059", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "seed": 59, "title": "Review 9 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/means-test/means-test-review-d3-t0059"} +{"id": "means-test-change-d1-t0060", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "seed": 60, "title": "Prorate 3 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-07 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-change-d1-t0060"} +{"id": "means-test-entitlement-d1-t0061", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "seed": 61, "title": "Assess 4 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/means-test/means-test-entitlement-d1-t0061"} +{"id": "means-test-overpayment-d1-t0062", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "seed": 62, "title": "Work out overpayments for 3 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/means-test/means-test-overpayment-d1-t0062"} +{"id": "means-test-review-d1-t0063", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "seed": 63, "title": "Review 5 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-review-d1-t0063"} +{"id": "means-test-change-d2-t0064", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "seed": 64, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-04 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d2-t0064"} +{"id": "means-test-entitlement-d2-t0065", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "seed": 65, "title": "Assess 6 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/means-test/means-test-entitlement-d2-t0065"} +{"id": "means-test-overpayment-d2-t0066", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "seed": 66, "title": "Work out overpayments for 4 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/means-test/means-test-overpayment-d2-t0066"} +{"id": "means-test-review-d2-t0067", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "seed": 67, "title": "Review 7 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 19, "path": "tasks/means-test/means-test-review-d2-t0067"} +{"id": "means-test-change-d3-t0068", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "seed": 68, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-02 (28 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d3-t0068"} +{"id": "means-test-entitlement-d3-t0069", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "seed": 69, "title": "Assess 7 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/means-test/means-test-entitlement-d3-t0069"} +{"id": "means-test-overpayment-d3-t0070", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "seed": 70, "title": "Work out overpayments for 5 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/means-test/means-test-overpayment-d3-t0070"} +{"id": "means-test-review-d3-t0071", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "seed": 71, "title": "Review 9 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/means-test/means-test-review-d3-t0071"} +{"id": "means-test-change-d1-t0072", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "seed": 72, "title": "Prorate 3 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-05 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-change-d1-t0072"} +{"id": "means-test-entitlement-d1-t0073", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "seed": 73, "title": "Assess 4 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/means-test/means-test-entitlement-d1-t0073"} +{"id": "means-test-overpayment-d1-t0074", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "seed": 74, "title": "Work out overpayments for 3 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/means-test/means-test-overpayment-d1-t0074"} +{"id": "means-test-review-d1-t0075", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "seed": 75, "title": "Review 5 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/means-test/means-test-review-d1-t0075"} +{"id": "means-test-change-d2-t0076", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "seed": 76, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-06 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d2-t0076"} +{"id": "means-test-entitlement-d2-t0077", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "seed": 77, "title": "Assess 6 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 31, "path": "tasks/means-test/means-test-entitlement-d2-t0077"} +{"id": "means-test-overpayment-d2-t0078", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "seed": 78, "title": "Work out overpayments for 4 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/means-test/means-test-overpayment-d2-t0078"} +{"id": "means-test-review-d2-t0079", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "seed": 79, "title": "Review 7 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 19, "path": "tasks/means-test/means-test-review-d2-t0079"} +{"id": "means-test-change-d3-t0080", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "seed": 80, "title": "Prorate 4 cases with a change during the month", "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-08 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 14, "path": "tasks/means-test/means-test-change-d3-t0080"} +{"id": "means-test-entitlement-d3-t0081", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "seed": 81, "title": "Assess 7 households", "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 37, "path": "tasks/means-test/means-test-entitlement-d3-t0081"} +{"id": "means-test-overpayment-d3-t0082", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "seed": 82, "title": "Work out overpayments for 5 cases", "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/means-test/means-test-overpayment-d3-t0082"} +{"id": "means-test-review-d3-t0083", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "seed": 83, "title": "Review 9 benefit decisions", "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 27, "path": "tasks/means-test/means-test-review-d3-t0083"} diff --git a/data/price-index/eval.jsonl b/data/price-index/eval.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..184b4f0b4ff22d1507b8d53dee55f15d3c2797c4 --- /dev/null +++ b/data/price-index/eval.jsonl @@ -0,0 +1,24 @@ +{"id": "price-index-basket-indices-d1-e0000", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "seed": 10000, "title": "Price indices, 5 items over 3 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2016, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2016\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-basket-indices-d1-e0000"} +{"id": "price-index-income-distribution-d1-e0001", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "seed": 10001, "title": "Income distribution, 30 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 30 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/price-index/price-index-income-distribution-d1-e0001"} +{"id": "price-index-inflation-contributions-d1-e0002", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "seed": 10002, "title": "Inflation contributions, 5 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2012-03 (the current month) with 2012-02 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2012-02\"` and `\"2012-03\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2012-02 to 2012-03, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-inflation-contributions-d1-e0002"} +{"id": "price-index-national-accounts-d1-e0003", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "seed": 10003, "title": "GDP for 3 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2017 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2017\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2017, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2017).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2017).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-national-accounts-d1-e0003"} +{"id": "price-index-basket-indices-d2-e0004", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "seed": 10004, "title": "Price indices, 8 items over 4 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2019, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2019\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-basket-indices-d2-e0004"} +{"id": "price-index-income-distribution-d2-e0005", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "seed": 10005, "title": "Income distribution, 40 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 40 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-income-distribution-d2-e0005"} +{"id": "price-index-inflation-contributions-d2-e0006", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "seed": 10006, "title": "Inflation contributions, 8 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2023-07 (the current month) with 2022-07 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2022-07\"` and `\"2023-07\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2022-07 to 2023-07, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-inflation-contributions-d2-e0006"} +{"id": "price-index-national-accounts-d2-e0007", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "seed": 10007, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2013 and the reference year of the chain-linked index is 2011 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2011) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2011\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2013, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2011 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2011).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2011).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/price-index/price-index-national-accounts-d2-e0007"} +{"id": "price-index-basket-indices-d3-e0008", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "seed": 10008, "title": "Price indices, 10 items over 5 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2015, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2015\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-basket-indices-d3-e0008"} +{"id": "price-index-income-distribution-d3-e0009", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "seed": 10009, "title": "Income distribution, 40 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 40 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/price-index/price-index-income-distribution-d3-e0009"} +{"id": "price-index-inflation-contributions-d3-e0010", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "seed": 10010, "title": "Inflation contributions, 11 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2021-02, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2021-02: rebased index = 100 x published index / published index of the same category in 2021-02. Use the rebased indices everywhere below.\n\nCompare 2022-04 (the current month) with 2021-04 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2021-04\"` and `\"2022-04\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2021-04 to 2022-04, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-inflation-contributions-d3-e0010"} +{"id": "price-index-national-accounts-d3-e0011", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "seed": 10011, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2014 and the reference year of the chain-linked index is 2013 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2013) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2013 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2011\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2014, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2013 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2013 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2014 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2011 to 2015, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/price-index/price-index-national-accounts-d3-e0011"} +{"id": "price-index-basket-indices-d1-e0012", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "seed": 10012, "title": "Price indices, 5 items over 3 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2012, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2012\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-basket-indices-d1-e0012"} +{"id": "price-index-income-distribution-d1-e0013", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "seed": 10013, "title": "Income distribution, 20 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 20 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/price-index/price-index-income-distribution-d1-e0013"} +{"id": "price-index-inflation-contributions-d1-e0014", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "seed": 10014, "title": "Inflation contributions, 5 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2018-09 (the current month) with 2018-08 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2018-08\"` and `\"2018-09\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2018-08 to 2018-09, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-inflation-contributions-d1-e0014"} +{"id": "price-index-national-accounts-d1-e0015", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "seed": 10015, "title": "GDP for 3 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2019 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2019\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2019, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2019).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2019).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-national-accounts-d1-e0015"} +{"id": "price-index-basket-indices-d2-e0016", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "seed": 10016, "title": "Price indices, 8 items over 4 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2011, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2011\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-basket-indices-d2-e0016"} +{"id": "price-index-income-distribution-d2-e0017", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "seed": 10017, "title": "Income distribution, 40 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 40 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-income-distribution-d2-e0017"} +{"id": "price-index-inflation-contributions-d2-e0018", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "seed": 10018, "title": "Inflation contributions, 8 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2014-02 (the current month) with 2013-02 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2013-02\"` and `\"2014-02\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2013-02 to 2014-02, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-inflation-contributions-d2-e0018"} +{"id": "price-index-national-accounts-d2-e0019", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "seed": 10019, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2014 and the reference year of the chain-linked index is 2014 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2014) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2014\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2014, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2014 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2014).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2014).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/price-index/price-index-national-accounts-d2-e0019"} +{"id": "price-index-basket-indices-d3-e0020", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "seed": 10020, "title": "Price indices, 10 items over 5 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2015, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2015\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-basket-indices-d3-e0020"} +{"id": "price-index-income-distribution-d3-e0021", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "seed": 10021, "title": "Income distribution, 40 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 40 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/price-index/price-index-income-distribution-d3-e0021"} +{"id": "price-index-inflation-contributions-d3-e0022", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "seed": 10022, "title": "Inflation contributions, 11 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2014-01, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2014-01: rebased index = 100 x published index / published index of the same category in 2014-01. Use the rebased indices everywhere below.\n\nCompare 2015-03 (the current month) with 2014-03 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2014-03\"` and `\"2015-03\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2014-03 to 2015-03, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-inflation-contributions-d3-e0022"} +{"id": "price-index-national-accounts-d3-e0023", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "seed": 10023, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2011 and the reference year of the chain-linked index is 2012 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2012) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2012 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2010\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2011, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2012 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2012 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2011 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2010 to 2014, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/price-index/price-index-national-accounts-d3-e0023"} diff --git a/data/price-index/train.jsonl b/data/price-index/train.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..bdd4845bced2222d6d28ce099ee8b9f3fc7119f1 --- /dev/null +++ b/data/price-index/train.jsonl @@ -0,0 +1,84 @@ +{"id": "price-index-basket-indices-d1-t0000", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "seed": 0, "title": "Price indices, 5 items over 3 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2010, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2010\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-basket-indices-d1-t0000"} +{"id": "price-index-income-distribution-d1-t0001", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "seed": 1, "title": "Income distribution, 30 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 30 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/price-index/price-index-income-distribution-d1-t0001"} +{"id": "price-index-inflation-contributions-d1-t0002", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "seed": 2, "title": "Inflation contributions, 5 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2018-07 (the current month) with 2018-06 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2018-06\"` and `\"2018-07\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2018-06 to 2018-07, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-inflation-contributions-d1-t0002"} +{"id": "price-index-national-accounts-d1-t0003", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "seed": 3, "title": "GDP for 3 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2019 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2019\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2019, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2019).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2019).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-national-accounts-d1-t0003"} +{"id": "price-index-basket-indices-d2-t0004", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "seed": 4, "title": "Price indices, 8 items over 4 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2019, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2019\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-basket-indices-d2-t0004"} +{"id": "price-index-income-distribution-d2-t0005", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "seed": 5, "title": "Income distribution, 50 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 50 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-income-distribution-d2-t0005"} +{"id": "price-index-inflation-contributions-d2-t0006", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "seed": 6, "title": "Inflation contributions, 8 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2018-06 (the current month) with 2017-06 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2017-06\"` and `\"2018-06\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2017-06 to 2018-06, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-inflation-contributions-d2-t0006"} +{"id": "price-index-national-accounts-d2-t0007", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "seed": 7, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2016 and the reference year of the chain-linked index is 2012 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2012) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2012\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2016, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2012 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2012).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2012).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/price-index/price-index-national-accounts-d2-t0007"} +{"id": "price-index-basket-indices-d3-t0008", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "seed": 8, "title": "Price indices, 10 items over 5 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2011, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2011\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-basket-indices-d3-t0008"} +{"id": "price-index-income-distribution-d3-t0009", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "seed": 9, "title": "Income distribution, 45 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 45 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/price-index/price-index-income-distribution-d3-t0009"} +{"id": "price-index-inflation-contributions-d3-t0010", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "seed": 10, "title": "Inflation contributions, 11 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2015-04, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2015-04: rebased index = 100 x published index / published index of the same category in 2015-04. Use the rebased indices everywhere below.\n\nCompare 2016-05 (the current month) with 2015-05 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2015-05\"` and `\"2016-05\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2015-05 to 2016-05, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-inflation-contributions-d3-t0010"} +{"id": "price-index-national-accounts-d3-t0011", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "seed": 11, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2011 and the reference year of the chain-linked index is 2010 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2010) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2010 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2009\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2011, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2010 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2010 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2011 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2009 to 2013, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/price-index/price-index-national-accounts-d3-t0011"} +{"id": "price-index-basket-indices-d1-t0012", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "seed": 12, "title": "Price indices, 5 items over 3 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2019, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2019\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-basket-indices-d1-t0012"} +{"id": "price-index-income-distribution-d1-t0013", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "seed": 13, "title": "Income distribution, 20 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 20 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/price-index/price-index-income-distribution-d1-t0013"} +{"id": "price-index-inflation-contributions-d1-t0014", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "seed": 14, "title": "Inflation contributions, 5 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2020-01 (the current month) with 2019-12 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2019-12\"` and `\"2020-01\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2019-12 to 2020-01, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-inflation-contributions-d1-t0014"} +{"id": "price-index-national-accounts-d1-t0015", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "seed": 15, "title": "GDP for 3 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2019 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2019\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2019, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2019).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2019).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-national-accounts-d1-t0015"} +{"id": "price-index-basket-indices-d2-t0016", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "seed": 16, "title": "Price indices, 8 items over 4 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2019, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2019\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-basket-indices-d2-t0016"} +{"id": "price-index-income-distribution-d2-t0017", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "seed": 17, "title": "Income distribution, 45 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 45 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-income-distribution-d2-t0017"} +{"id": "price-index-inflation-contributions-d2-t0018", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "seed": 18, "title": "Inflation contributions, 8 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2014-03 (the current month) with 2013-03 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2013-03\"` and `\"2014-03\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2013-03 to 2014-03, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-inflation-contributions-d2-t0018"} +{"id": "price-index-national-accounts-d2-t0019", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "seed": 19, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2015 and the reference year of the chain-linked index is 2012 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2012) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2012\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2015, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2012 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2012).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2012).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/price-index/price-index-national-accounts-d2-t0019"} +{"id": "price-index-basket-indices-d3-t0020", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "seed": 20, "title": "Price indices, 10 items over 5 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2012, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2012\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-basket-indices-d3-t0020"} +{"id": "price-index-income-distribution-d3-t0021", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "seed": 21, "title": "Income distribution, 45 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 45 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/price-index/price-index-income-distribution-d3-t0021"} +{"id": "price-index-inflation-contributions-d3-t0022", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "seed": 22, "title": "Inflation contributions, 11 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2015-03, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2015-03: rebased index = 100 x published index / published index of the same category in 2015-03. Use the rebased indices everywhere below.\n\nCompare 2016-05 (the current month) with 2015-05 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2015-05\"` and `\"2016-05\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2015-05 to 2016-05, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-inflation-contributions-d3-t0022"} +{"id": "price-index-national-accounts-d3-t0023", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "seed": 23, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2018 and the reference year of the chain-linked index is 2016 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2016) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2016 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2015\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2018, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2016 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2016 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2018 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2015 to 2019, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/price-index/price-index-national-accounts-d3-t0023"} +{"id": "price-index-basket-indices-d1-t0024", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "seed": 24, "title": "Price indices, 5 items over 3 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2013, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2013\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-basket-indices-d1-t0024"} +{"id": "price-index-income-distribution-d1-t0025", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "seed": 25, "title": "Income distribution, 20 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 20 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/price-index/price-index-income-distribution-d1-t0025"} +{"id": "price-index-inflation-contributions-d1-t0026", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "seed": 26, "title": "Inflation contributions, 5 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2018-10 (the current month) with 2018-09 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2018-09\"` and `\"2018-10\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2018-09 to 2018-10, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-inflation-contributions-d1-t0026"} +{"id": "price-index-national-accounts-d1-t0027", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "seed": 27, "title": "GDP for 3 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2017 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2017\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2017, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2017).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2017).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-national-accounts-d1-t0027"} +{"id": "price-index-basket-indices-d2-t0028", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "seed": 28, "title": "Price indices, 8 items over 4 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2011, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2011\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-basket-indices-d2-t0028"} +{"id": "price-index-income-distribution-d2-t0029", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "seed": 29, "title": "Income distribution, 60 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 60 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-income-distribution-d2-t0029"} +{"id": "price-index-inflation-contributions-d2-t0030", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "seed": 30, "title": "Inflation contributions, 8 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2024-04 (the current month) with 2023-04 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2023-04\"` and `\"2024-04\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2023-04 to 2024-04, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-inflation-contributions-d2-t0030"} +{"id": "price-index-national-accounts-d2-t0031", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "seed": 31, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2012 and the reference year of the chain-linked index is 2009 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2009) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2009\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2012, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2009 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2009).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2009).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/price-index/price-index-national-accounts-d2-t0031"} +{"id": "price-index-basket-indices-d3-t0032", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "seed": 32, "title": "Price indices, 10 items over 5 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2013, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2013\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-basket-indices-d3-t0032"} +{"id": "price-index-income-distribution-d3-t0033", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "seed": 33, "title": "Income distribution, 40 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 40 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/price-index/price-index-income-distribution-d3-t0033"} +{"id": "price-index-inflation-contributions-d3-t0034", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "seed": 34, "title": "Inflation contributions, 11 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2016-09, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2016-09: rebased index = 100 x published index / published index of the same category in 2016-09. Use the rebased indices everywhere below.\n\nCompare 2017-12 (the current month) with 2016-12 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2016-12\"` and `\"2017-12\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2016-12 to 2017-12, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-inflation-contributions-d3-t0034"} +{"id": "price-index-national-accounts-d3-t0035", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "seed": 35, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2020 and the reference year of the chain-linked index is 2019 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2019) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2019 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2017\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2020, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2019 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2019 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2020 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2017 to 2021, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/price-index/price-index-national-accounts-d3-t0035"} +{"id": "price-index-basket-indices-d1-t0036", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "seed": 36, "title": "Price indices, 5 items over 3 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2016, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2016\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-basket-indices-d1-t0036"} +{"id": "price-index-income-distribution-d1-t0037", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "seed": 37, "title": "Income distribution, 25 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 25 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/price-index/price-index-income-distribution-d1-t0037"} +{"id": "price-index-inflation-contributions-d1-t0038", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "seed": 38, "title": "Inflation contributions, 5 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2016-02 (the current month) with 2016-01 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2016-01\"` and `\"2016-02\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2016-01 to 2016-02, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-inflation-contributions-d1-t0038"} +{"id": "price-index-national-accounts-d1-t0039", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "seed": 39, "title": "GDP for 3 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2008 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2008\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2008, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2008).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2008).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-national-accounts-d1-t0039"} +{"id": "price-index-basket-indices-d2-t0040", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "seed": 40, "title": "Price indices, 8 items over 4 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2016, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2016\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-basket-indices-d2-t0040"} +{"id": "price-index-income-distribution-d2-t0041", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "seed": 41, "title": "Income distribution, 40 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 40 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-income-distribution-d2-t0041"} +{"id": "price-index-inflation-contributions-d2-t0042", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "seed": 42, "title": "Inflation contributions, 8 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2013-02 (the current month) with 2012-02 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2012-02\"` and `\"2013-02\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2012-02 to 2013-02, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-inflation-contributions-d2-t0042"} +{"id": "price-index-national-accounts-d2-t0043", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "seed": 43, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2017 and the reference year of the chain-linked index is 2013 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2013) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2013\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2017, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2013 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2013).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2013).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/price-index/price-index-national-accounts-d2-t0043"} +{"id": "price-index-basket-indices-d3-t0044", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "seed": 44, "title": "Price indices, 10 items over 5 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2020, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2020\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-basket-indices-d3-t0044"} +{"id": "price-index-income-distribution-d3-t0045", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "seed": 45, "title": "Income distribution, 50 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 50 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/price-index/price-index-income-distribution-d3-t0045"} +{"id": "price-index-inflation-contributions-d3-t0046", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "seed": 46, "title": "Inflation contributions, 11 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2014-02, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2014-02: rebased index = 100 x published index / published index of the same category in 2014-02. Use the rebased indices everywhere below.\n\nCompare 2015-04 (the current month) with 2014-04 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2014-04\"` and `\"2015-04\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2014-04 to 2015-04, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-inflation-contributions-d3-t0046"} +{"id": "price-index-national-accounts-d3-t0047", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "seed": 47, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2020 and the reference year of the chain-linked index is 2019 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2019) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2019 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2018\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2020, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2019 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2019 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2020 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2018 to 2022, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/price-index/price-index-national-accounts-d3-t0047"} +{"id": "price-index-basket-indices-d1-t0048", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "seed": 48, "title": "Price indices, 5 items over 3 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2012, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2012\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-basket-indices-d1-t0048"} +{"id": "price-index-income-distribution-d1-t0049", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "seed": 49, "title": "Income distribution, 25 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 25 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/price-index/price-index-income-distribution-d1-t0049"} +{"id": "price-index-inflation-contributions-d1-t0050", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "seed": 50, "title": "Inflation contributions, 5 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2021-05 (the current month) with 2021-04 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2021-04\"` and `\"2021-05\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2021-04 to 2021-05, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-inflation-contributions-d1-t0050"} +{"id": "price-index-national-accounts-d1-t0051", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "seed": 51, "title": "GDP for 3 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2014 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2014\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2014, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2014).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2014).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-national-accounts-d1-t0051"} +{"id": "price-index-basket-indices-d2-t0052", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "seed": 52, "title": "Price indices, 8 items over 4 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2016, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2016\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-basket-indices-d2-t0052"} +{"id": "price-index-income-distribution-d2-t0053", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "seed": 53, "title": "Income distribution, 45 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 45 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-income-distribution-d2-t0053"} +{"id": "price-index-inflation-contributions-d2-t0054", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "seed": 54, "title": "Inflation contributions, 8 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2021-07 (the current month) with 2020-07 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2020-07\"` and `\"2021-07\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2020-07 to 2021-07, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-inflation-contributions-d2-t0054"} +{"id": "price-index-national-accounts-d2-t0055", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "seed": 55, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2016 and the reference year of the chain-linked index is 2015 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2015) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2015\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2016, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2015 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2015).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2015).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/price-index/price-index-national-accounts-d2-t0055"} +{"id": "price-index-basket-indices-d3-t0056", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "seed": 56, "title": "Price indices, 10 items over 5 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2012, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2012\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-basket-indices-d3-t0056"} +{"id": "price-index-income-distribution-d3-t0057", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "seed": 57, "title": "Income distribution, 40 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 40 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/price-index/price-index-income-distribution-d3-t0057"} +{"id": "price-index-inflation-contributions-d3-t0058", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "seed": 58, "title": "Inflation contributions, 11 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2014-05, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2014-05: rebased index = 100 x published index / published index of the same category in 2014-05. Use the rebased indices everywhere below.\n\nCompare 2015-06 (the current month) with 2014-06 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2014-06\"` and `\"2015-06\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2014-06 to 2015-06, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-inflation-contributions-d3-t0058"} +{"id": "price-index-national-accounts-d3-t0059", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "seed": 59, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2011 and the reference year of the chain-linked index is 2012 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2012) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2012 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2011\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2011, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2012 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2012 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2011 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2011 to 2015, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/price-index/price-index-national-accounts-d3-t0059"} +{"id": "price-index-basket-indices-d1-t0060", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "seed": 60, "title": "Price indices, 5 items over 3 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2014, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2014\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-basket-indices-d1-t0060"} +{"id": "price-index-income-distribution-d1-t0061", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "seed": 61, "title": "Income distribution, 25 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 25 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/price-index/price-index-income-distribution-d1-t0061"} +{"id": "price-index-inflation-contributions-d1-t0062", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "seed": 62, "title": "Inflation contributions, 5 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2020-06 (the current month) with 2020-05 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2020-05\"` and `\"2020-06\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2020-05 to 2020-06, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-inflation-contributions-d1-t0062"} +{"id": "price-index-national-accounts-d1-t0063", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "seed": 63, "title": "GDP for 3 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2010 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2010\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2010, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2010).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2010).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-national-accounts-d1-t0063"} +{"id": "price-index-basket-indices-d2-t0064", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "seed": 64, "title": "Price indices, 8 items over 4 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2015, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2015\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-basket-indices-d2-t0064"} +{"id": "price-index-income-distribution-d2-t0065", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "seed": 65, "title": "Income distribution, 60 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 60 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-income-distribution-d2-t0065"} +{"id": "price-index-inflation-contributions-d2-t0066", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "seed": 66, "title": "Inflation contributions, 8 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2015-11 (the current month) with 2014-11 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2014-11\"` and `\"2015-11\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2014-11 to 2015-11, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-inflation-contributions-d2-t0066"} +{"id": "price-index-national-accounts-d2-t0067", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "seed": 67, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2020 and the reference year of the chain-linked index is 2017 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2017) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2017\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2020, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2017 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2017).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2017).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/price-index/price-index-national-accounts-d2-t0067"} +{"id": "price-index-basket-indices-d3-t0068", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "seed": 68, "title": "Price indices, 10 items over 5 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2019, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2019\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-basket-indices-d3-t0068"} +{"id": "price-index-income-distribution-d3-t0069", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "seed": 69, "title": "Income distribution, 50 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 50 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/price-index/price-index-income-distribution-d3-t0069"} +{"id": "price-index-inflation-contributions-d3-t0070", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "seed": 70, "title": "Inflation contributions, 11 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2022-02, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2022-02: rebased index = 100 x published index / published index of the same category in 2022-02. Use the rebased indices everywhere below.\n\nCompare 2023-04 (the current month) with 2022-04 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2022-04\"` and `\"2023-04\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2022-04 to 2023-04, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-inflation-contributions-d3-t0070"} +{"id": "price-index-national-accounts-d3-t0071", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "seed": 71, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2019 and the reference year of the chain-linked index is 2016 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2016) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2016 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2015\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2019, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2016 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2016 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2019 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2015 to 2019, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/price-index/price-index-national-accounts-d3-t0071"} +{"id": "price-index-basket-indices-d1-t0072", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "seed": 72, "title": "Price indices, 5 items over 3 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2015, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2015\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-basket-indices-d1-t0072"} +{"id": "price-index-income-distribution-d1-t0073", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "seed": 73, "title": "Income distribution, 20 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 20 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/price-index/price-index-income-distribution-d1-t0073"} +{"id": "price-index-inflation-contributions-d1-t0074", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "seed": 74, "title": "Inflation contributions, 5 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2014-08 (the current month) with 2014-07 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2014-07\"` and `\"2014-08\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2014-07 to 2014-08, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/price-index/price-index-inflation-contributions-d1-t0074"} +{"id": "price-index-national-accounts-d1-t0075", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "seed": 75, "title": "GDP for 3 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2018 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2018\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2018, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2018).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2018).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-national-accounts-d1-t0075"} +{"id": "price-index-basket-indices-d2-t0076", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "seed": 76, "title": "Price indices, 8 items over 4 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2019, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2019\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-basket-indices-d2-t0076"} +{"id": "price-index-income-distribution-d2-t0077", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "seed": 77, "title": "Income distribution, 60 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 60 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-income-distribution-d2-t0077"} +{"id": "price-index-inflation-contributions-d2-t0078", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "seed": 78, "title": "Inflation contributions, 8 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2018-01 (the current month) with 2017-01 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2017-01\"` and `\"2018-01\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2017-01 to 2018-01, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/price-index/price-index-inflation-contributions-d2-t0078"} +{"id": "price-index-national-accounts-d2-t0079", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "seed": 79, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2015 and the reference year of the chain-linked index is 2012 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2012) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2012\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2015, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2012 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2012).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2012).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 28, "path": "tasks/price-index/price-index-national-accounts-d2-t0079"} +{"id": "price-index-basket-indices-d3-t0080", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "seed": 80, "title": "Price indices, 10 items over 5 years", "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2018, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2018\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-basket-indices-d3-t0080"} +{"id": "price-index-income-distribution-d3-t0081", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "seed": 81, "title": "Income distribution, 35 households", "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 35 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/price-index/price-index-income-distribution-d3-t0081"} +{"id": "price-index-inflation-contributions-d3-t0082", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "seed": 82, "title": "Inflation contributions, 11 categories", "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2019-06, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2019-06: rebased index = 100 x published index / published index of the same category in 2019-06. Use the rebased indices everywhere below.\n\nCompare 2020-07 (the current month) with 2019-07 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2019-07\"` and `\"2020-07\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2019-07 to 2020-07, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 22, "path": "tasks/price-index/price-index-inflation-contributions-d3-t0082"} +{"id": "price-index-national-accounts-d3-t0083", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "seed": 83, "title": "GDP for 5 years", "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2017 and the reference year of the chain-linked index is 2019 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2019) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2019 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2016\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2017, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2019 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2019 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2017 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2016 to 2020, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 32, "path": "tasks/price-index/price-index-national-accounts-d3-t0083"} diff --git a/data/psychometrics/eval.jsonl b/data/psychometrics/eval.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..48babc8f50d98916c9bcd53ce314048b4f0b654a --- /dev/null +++ b/data/psychometrics/eval.jsonl @@ -0,0 +1,24 @@ +{"id": "psychometrics-norms-d1-e0000", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "seed": 10000, "title": "Norm-referenced scores for 6 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/psychometrics/psychometrics-norms-d1-e0000"} +{"id": "psychometrics-reliability-d1-e0001", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "seed": 10001, "title": "Reliability of a 5-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Work Engagement Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/psychometrics/psychometrics-reliability-d1-e0001"} +{"id": "psychometrics-reliable-change-d1-e0002", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "seed": 10002, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-e0002"} +{"id": "psychometrics-scoring-d1-e0003", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "seed": 10003, "title": "Score the Stress Checklist for 5 clients", "instruction": "# Questionnaire scoring: Stress Checklist\n\n`responses.csv` holds the item responses of 5 clients to the Stress Checklist, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).", "checks": 21, "path": "tasks/psychometrics/psychometrics-scoring-d1-e0003"} +{"id": "psychometrics-norms-d2-e0004", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "seed": 10004, "title": "Norm-referenced scores for 8 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/psychometrics/psychometrics-norms-d2-e0004"} +{"id": "psychometrics-reliability-d2-e0005", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "seed": 10005, "title": "Reliability of a 7-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Work Engagement Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/psychometrics/psychometrics-reliability-d2-e0005"} +{"id": "psychometrics-reliable-change-d2-e0006", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "seed": 10006, "title": "Reliable change for 8 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-e0006"} +{"id": "psychometrics-scoring-d2-e0007", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "seed": 10007, "title": "Score the Daily Strain Scale for 7 clients", "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 7 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).", "checks": 31, "path": "tasks/psychometrics/psychometrics-scoring-d2-e0007"} +{"id": "psychometrics-norms-d3-e0008", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "seed": 10008, "title": "Norm-referenced scores for 5 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/psychometrics/psychometrics-norms-d3-e0008"} +{"id": "psychometrics-reliability-d3-e0009", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "seed": 10009, "title": "Reliability of a 8-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 33 people to the 8 items of the Study Motivation Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/psychometrics/psychometrics-reliability-d3-e0009"} +{"id": "psychometrics-reliable-change-d3-e0010", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "seed": 10010, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 43, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-e0010"} +{"id": "psychometrics-scoring-d3-e0011", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "seed": 10011, "title": "Score the Worry Questionnaire for 7 clients", "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none).", "checks": 39, "path": "tasks/psychometrics/psychometrics-scoring-d3-e0011"} +{"id": "psychometrics-norms-d1-e0012", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "seed": 10012, "title": "Norm-referenced scores for 6 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/psychometrics/psychometrics-norms-d1-e0012"} +{"id": "psychometrics-reliability-d1-e0013", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "seed": 10013, "title": "Reliability of a 5-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/psychometrics/psychometrics-reliability-d1-e0013"} +{"id": "psychometrics-reliable-change-d1-e0014", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "seed": 10014, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-e0014"} +{"id": "psychometrics-scoring-d1-e0015", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "seed": 10015, "title": "Score the Daily Strain Scale for 5 clients", "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 5 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).", "checks": 21, "path": "tasks/psychometrics/psychometrics-scoring-d1-e0015"} +{"id": "psychometrics-norms-d2-e0016", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "seed": 10016, "title": "Norm-referenced scores for 8 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Fatigue Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/psychometrics/psychometrics-norms-d2-e0016"} +{"id": "psychometrics-reliability-d2-e0017", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "seed": 10017, "title": "Reliability of a 7-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/psychometrics/psychometrics-reliability-d2-e0017"} +{"id": "psychometrics-reliable-change-d2-e0018", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "seed": 10018, "title": "Reliable change for 8 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 35, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-e0018"} +{"id": "psychometrics-scoring-d2-e0019", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "seed": 10019, "title": "Score the Daily Strain Scale for 7 clients", "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 7 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).", "checks": 34, "path": "tasks/psychometrics/psychometrics-scoring-d2-e0019"} +{"id": "psychometrics-norms-d3-e0020", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "seed": 10020, "title": "Norm-referenced scores for 5 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/psychometrics/psychometrics-norms-d3-e0020"} +{"id": "psychometrics-reliability-d3-e0021", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "seed": 10021, "title": "Reliability of a 8-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 34 people to the 8 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/psychometrics/psychometrics-reliability-d3-e0021"} +{"id": "psychometrics-reliable-change-d3-e0022", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "seed": 10022, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 41, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-e0022"} +{"id": "psychometrics-scoring-d3-e0023", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "seed": 10023, "title": "Score the Daily Strain Scale for 7 clients", "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 7 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none).", "checks": 39, "path": "tasks/psychometrics/psychometrics-scoring-d3-e0023"} diff --git a/data/psychometrics/train.jsonl b/data/psychometrics/train.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..a6f2705d9b134639e3a6f7a3b9cd3a796b732346 --- /dev/null +++ b/data/psychometrics/train.jsonl @@ -0,0 +1,84 @@ +{"id": "psychometrics-norms-d1-t0000", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "seed": 0, "title": "Norm-referenced scores for 6 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/psychometrics/psychometrics-norms-d1-t0000"} +{"id": "psychometrics-reliability-d1-t0001", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "seed": 1, "title": "Reliability of a 5-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Study Motivation Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/psychometrics/psychometrics-reliability-d1-t0001"} +{"id": "psychometrics-reliable-change-d1-t0002", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "seed": 2, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-t0002"} +{"id": "psychometrics-scoring-d1-t0003", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "seed": 3, "title": "Score the Stress Checklist for 5 clients", "instruction": "# Questionnaire scoring: Stress Checklist\n\n`responses.csv` holds the item responses of 5 clients to the Stress Checklist, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).", "checks": 21, "path": "tasks/psychometrics/psychometrics-scoring-d1-t0003"} +{"id": "psychometrics-norms-d2-t0004", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "seed": 4, "title": "Norm-referenced scores for 8 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Withdrawal Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/psychometrics/psychometrics-norms-d2-t0004"} +{"id": "psychometrics-reliability-d2-t0005", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "seed": 5, "title": "Reliability of a 7-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Social Confidence Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/psychometrics/psychometrics-reliability-d2-t0005"} +{"id": "psychometrics-reliable-change-d2-t0006", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "seed": 6, "title": "Reliable change for 8 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-t0006"} +{"id": "psychometrics-scoring-d2-t0007", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "seed": 7, "title": "Score the Daily Strain Scale for 7 clients", "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 7 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).", "checks": 34, "path": "tasks/psychometrics/psychometrics-scoring-d2-t0007"} +{"id": "psychometrics-norms-d3-t0008", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "seed": 8, "title": "Norm-referenced scores for 5 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/psychometrics/psychometrics-norms-d3-t0008"} +{"id": "psychometrics-reliability-d3-t0009", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "seed": 9, "title": "Reliability of a 8-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 33 people to the 8 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/psychometrics/psychometrics-reliability-d3-t0009"} +{"id": "psychometrics-reliable-change-d3-t0010", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "seed": 10, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 43, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-t0010"} +{"id": "psychometrics-scoring-d3-t0011", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "seed": 11, "title": "Score the Worry Questionnaire for 7 clients", "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none).", "checks": 42, "path": "tasks/psychometrics/psychometrics-scoring-d3-t0011"} +{"id": "psychometrics-norms-d1-t0012", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "seed": 12, "title": "Norm-referenced scores for 6 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Attention Difficulties Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/psychometrics/psychometrics-norms-d1-t0012"} +{"id": "psychometrics-reliability-d1-t0013", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "seed": 13, "title": "Reliability of a 5-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Social Confidence Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/psychometrics/psychometrics-reliability-d1-t0013"} +{"id": "psychometrics-reliable-change-d1-t0014", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "seed": 14, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-t0014"} +{"id": "psychometrics-scoring-d1-t0015", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "seed": 15, "title": "Score the Worry Questionnaire for 5 clients", "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 5 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).", "checks": 21, "path": "tasks/psychometrics/psychometrics-scoring-d1-t0015"} +{"id": "psychometrics-norms-d2-t0016", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "seed": 16, "title": "Norm-referenced scores for 8 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/psychometrics/psychometrics-norms-d2-t0016"} +{"id": "psychometrics-reliability-d2-t0017", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "seed": 17, "title": "Reliability of a 7-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/psychometrics/psychometrics-reliability-d2-t0017"} +{"id": "psychometrics-reliable-change-d2-t0018", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "seed": 18, "title": "Reliable change for 8 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-t0018"} +{"id": "psychometrics-scoring-d2-t0019", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "seed": 19, "title": "Score the Worry Questionnaire for 7 clients", "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).", "checks": 31, "path": "tasks/psychometrics/psychometrics-scoring-d2-t0019"} +{"id": "psychometrics-norms-d3-t0020", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "seed": 20, "title": "Norm-referenced scores for 5 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/psychometrics/psychometrics-norms-d3-t0020"} +{"id": "psychometrics-reliability-d3-t0021", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "seed": 21, "title": "Reliability of a 8-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 33 people to the 8 items of the Work Engagement Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/psychometrics/psychometrics-reliability-d3-t0021"} +{"id": "psychometrics-reliable-change-d3-t0022", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "seed": 22, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 41, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-t0022"} +{"id": "psychometrics-scoring-d3-t0023", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "seed": 23, "title": "Score the Stress Checklist for 7 clients", "instruction": "# Questionnaire scoring: Stress Checklist\n\n`responses.csv` holds the item responses of 7 clients to the Stress Checklist, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none).", "checks": 42, "path": "tasks/psychometrics/psychometrics-scoring-d3-t0023"} +{"id": "psychometrics-norms-d1-t0024", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "seed": 24, "title": "Norm-referenced scores for 6 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Fatigue Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/psychometrics/psychometrics-norms-d1-t0024"} +{"id": "psychometrics-reliability-d1-t0025", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "seed": 25, "title": "Reliability of a 5-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Work Engagement Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/psychometrics/psychometrics-reliability-d1-t0025"} +{"id": "psychometrics-reliable-change-d1-t0026", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "seed": 26, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-t0026"} +{"id": "psychometrics-scoring-d1-t0027", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "seed": 27, "title": "Score the Worry Questionnaire for 5 clients", "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 5 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).", "checks": 21, "path": "tasks/psychometrics/psychometrics-scoring-d1-t0027"} +{"id": "psychometrics-norms-d2-t0028", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "seed": 28, "title": "Norm-referenced scores for 8 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Fatigue Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/psychometrics/psychometrics-norms-d2-t0028"} +{"id": "psychometrics-reliability-d2-t0029", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "seed": 29, "title": "Reliability of a 7-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Social Confidence Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/psychometrics/psychometrics-reliability-d2-t0029"} +{"id": "psychometrics-reliable-change-d2-t0030", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "seed": 30, "title": "Reliable change for 8 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 35, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-t0030"} +{"id": "psychometrics-scoring-d2-t0031", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "seed": 31, "title": "Score the Worry Questionnaire for 7 clients", "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).", "checks": 31, "path": "tasks/psychometrics/psychometrics-scoring-d2-t0031"} +{"id": "psychometrics-norms-d3-t0032", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "seed": 32, "title": "Norm-referenced scores for 5 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/psychometrics/psychometrics-norms-d3-t0032"} +{"id": "psychometrics-reliability-d3-t0033", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "seed": 33, "title": "Reliability of a 8-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 35 people to the 8 items of the Study Motivation Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/psychometrics/psychometrics-reliability-d3-t0033"} +{"id": "psychometrics-reliable-change-d3-t0034", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "seed": 34, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 43, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-t0034"} +{"id": "psychometrics-scoring-d3-t0035", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "seed": 35, "title": "Score the Mood Inventory for 7 clients", "instruction": "# Questionnaire scoring: Mood Inventory\n\n`responses.csv` holds the item responses of 7 clients to the Mood Inventory, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none).", "checks": 42, "path": "tasks/psychometrics/psychometrics-scoring-d3-t0035"} +{"id": "psychometrics-norms-d1-t0036", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "seed": 36, "title": "Norm-referenced scores for 6 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Fatigue Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/psychometrics/psychometrics-norms-d1-t0036"} +{"id": "psychometrics-reliability-d1-t0037", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "seed": 37, "title": "Reliability of a 5-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/psychometrics/psychometrics-reliability-d1-t0037"} +{"id": "psychometrics-reliable-change-d1-t0038", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "seed": 38, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-t0038"} +{"id": "psychometrics-scoring-d1-t0039", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "seed": 39, "title": "Score the Daily Strain Scale for 5 clients", "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 5 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).", "checks": 21, "path": "tasks/psychometrics/psychometrics-scoring-d1-t0039"} +{"id": "psychometrics-norms-d2-t0040", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "seed": 40, "title": "Norm-referenced scores for 8 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Withdrawal Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/psychometrics/psychometrics-norms-d2-t0040"} +{"id": "psychometrics-reliability-d2-t0041", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "seed": 41, "title": "Reliability of a 7-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Study Motivation Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/psychometrics/psychometrics-reliability-d2-t0041"} +{"id": "psychometrics-reliable-change-d2-t0042", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "seed": 42, "title": "Reliable change for 8 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 35, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-t0042"} +{"id": "psychometrics-scoring-d2-t0043", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "seed": 43, "title": "Score the Daily Strain Scale for 7 clients", "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 7 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).", "checks": 34, "path": "tasks/psychometrics/psychometrics-scoring-d2-t0043"} +{"id": "psychometrics-norms-d3-t0044", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "seed": 44, "title": "Norm-referenced scores for 5 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/psychometrics/psychometrics-norms-d3-t0044"} +{"id": "psychometrics-reliability-d3-t0045", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "seed": 45, "title": "Reliability of a 8-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 33 people to the 8 items of the Social Confidence Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/psychometrics/psychometrics-reliability-d3-t0045"} +{"id": "psychometrics-reliable-change-d3-t0046", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "seed": 46, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 43, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-t0046"} +{"id": "psychometrics-scoring-d3-t0047", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "seed": 47, "title": "Score the Worry Questionnaire for 7 clients", "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none).", "checks": 42, "path": "tasks/psychometrics/psychometrics-scoring-d3-t0047"} +{"id": "psychometrics-norms-d1-t0048", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "seed": 48, "title": "Norm-referenced scores for 6 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/psychometrics/psychometrics-norms-d1-t0048"} +{"id": "psychometrics-reliability-d1-t0049", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "seed": 49, "title": "Reliability of a 5-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/psychometrics/psychometrics-reliability-d1-t0049"} +{"id": "psychometrics-reliable-change-d1-t0050", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "seed": 50, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-t0050"} +{"id": "psychometrics-scoring-d1-t0051", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "seed": 51, "title": "Score the Daily Strain Scale for 5 clients", "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 5 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).", "checks": 21, "path": "tasks/psychometrics/psychometrics-scoring-d1-t0051"} +{"id": "psychometrics-norms-d2-t0052", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "seed": 52, "title": "Norm-referenced scores for 8 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/psychometrics/psychometrics-norms-d2-t0052"} +{"id": "psychometrics-reliability-d2-t0053", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "seed": 53, "title": "Reliability of a 7-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/psychometrics/psychometrics-reliability-d2-t0053"} +{"id": "psychometrics-reliable-change-d2-t0054", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "seed": 54, "title": "Reliable change for 8 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-t0054"} +{"id": "psychometrics-scoring-d2-t0055", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "seed": 55, "title": "Score the Mood Inventory for 7 clients", "instruction": "# Questionnaire scoring: Mood Inventory\n\n`responses.csv` holds the item responses of 7 clients to the Mood Inventory, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).", "checks": 31, "path": "tasks/psychometrics/psychometrics-scoring-d2-t0055"} +{"id": "psychometrics-norms-d3-t0056", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "seed": 56, "title": "Norm-referenced scores for 5 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/psychometrics/psychometrics-norms-d3-t0056"} +{"id": "psychometrics-reliability-d3-t0057", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "seed": 57, "title": "Reliability of a 8-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 33 people to the 8 items of the Work Engagement Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/psychometrics/psychometrics-reliability-d3-t0057"} +{"id": "psychometrics-reliable-change-d3-t0058", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "seed": 58, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 41, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-t0058"} +{"id": "psychometrics-scoring-d3-t0059", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "seed": 59, "title": "Score the Mood Inventory for 7 clients", "instruction": "# Questionnaire scoring: Mood Inventory\n\n`responses.csv` holds the item responses of 7 clients to the Mood Inventory, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none).", "checks": 39, "path": "tasks/psychometrics/psychometrics-scoring-d3-t0059"} +{"id": "psychometrics-norms-d1-t0060", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "seed": 60, "title": "Norm-referenced scores for 6 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Fatigue Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/psychometrics/psychometrics-norms-d1-t0060"} +{"id": "psychometrics-reliability-d1-t0061", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "seed": 61, "title": "Reliability of a 5-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/psychometrics/psychometrics-reliability-d1-t0061"} +{"id": "psychometrics-reliable-change-d1-t0062", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "seed": 62, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-t0062"} +{"id": "psychometrics-scoring-d1-t0063", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "seed": 63, "title": "Score the Mood Inventory for 5 clients", "instruction": "# Questionnaire scoring: Mood Inventory\n\n`responses.csv` holds the item responses of 5 clients to the Mood Inventory, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).", "checks": 21, "path": "tasks/psychometrics/psychometrics-scoring-d1-t0063"} +{"id": "psychometrics-norms-d2-t0064", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "seed": 64, "title": "Norm-referenced scores for 8 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Fatigue Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/psychometrics/psychometrics-norms-d2-t0064"} +{"id": "psychometrics-reliability-d2-t0065", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "seed": 65, "title": "Reliability of a 7-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/psychometrics/psychometrics-reliability-d2-t0065"} +{"id": "psychometrics-reliable-change-d2-t0066", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "seed": 66, "title": "Reliable change for 8 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-t0066"} +{"id": "psychometrics-scoring-d2-t0067", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "seed": 67, "title": "Score the Daily Strain Scale for 7 clients", "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 7 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).", "checks": 34, "path": "tasks/psychometrics/psychometrics-scoring-d2-t0067"} +{"id": "psychometrics-norms-d3-t0068", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "seed": 68, "title": "Norm-referenced scores for 5 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/psychometrics/psychometrics-norms-d3-t0068"} +{"id": "psychometrics-reliability-d3-t0069", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "seed": 69, "title": "Reliability of a 8-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 33 people to the 8 items of the Social Confidence Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/psychometrics/psychometrics-reliability-d3-t0069"} +{"id": "psychometrics-reliable-change-d3-t0070", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "seed": 70, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 43, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-t0070"} +{"id": "psychometrics-scoring-d3-t0071", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "seed": 71, "title": "Score the Worry Questionnaire for 7 clients", "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none).", "checks": 39, "path": "tasks/psychometrics/psychometrics-scoring-d3-t0071"} +{"id": "psychometrics-norms-d1-t0072", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "seed": 72, "title": "Norm-referenced scores for 6 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/psychometrics/psychometrics-norms-d1-t0072"} +{"id": "psychometrics-reliability-d1-t0073", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "seed": 73, "title": "Reliability of a 5-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/psychometrics/psychometrics-reliability-d1-t0073"} +{"id": "psychometrics-reliable-change-d1-t0074", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "seed": 74, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-t0074"} +{"id": "psychometrics-scoring-d1-t0075", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "seed": 75, "title": "Score the Daily Strain Scale for 5 clients", "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 5 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).", "checks": 21, "path": "tasks/psychometrics/psychometrics-scoring-d1-t0075"} +{"id": "psychometrics-norms-d2-t0076", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "seed": 76, "title": "Norm-referenced scores for 8 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/psychometrics/psychometrics-norms-d2-t0076"} +{"id": "psychometrics-reliability-d2-t0077", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "seed": 77, "title": "Reliability of a 7-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 17, "path": "tasks/psychometrics/psychometrics-reliability-d2-t0077"} +{"id": "psychometrics-reliable-change-d2-t0078", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "seed": 78, "title": "Reliable change for 8 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-t0078"} +{"id": "psychometrics-scoring-d2-t0079", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "seed": 79, "title": "Score the Worry Questionnaire for 7 clients", "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).", "checks": 31, "path": "tasks/psychometrics/psychometrics-scoring-d2-t0079"} +{"id": "psychometrics-norms-d3-t0080", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "seed": 80, "title": "Norm-referenced scores for 5 clients", "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 38, "path": "tasks/psychometrics/psychometrics-norms-d3-t0080"} +{"id": "psychometrics-reliability-d3-t0081", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "seed": 81, "title": "Reliability of a 8-item scale", "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 35 people to the 8 items of the Work Engagement Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/psychometrics/psychometrics-reliability-d3-t0081"} +{"id": "psychometrics-reliable-change-d3-t0082", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "seed": 82, "title": "Reliable change for 6 clients", "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 43, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-t0082"} +{"id": "psychometrics-scoring-d3-t0083", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "seed": 83, "title": "Score the Worry Questionnaire for 7 clients", "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none).", "checks": 42, "path": "tasks/psychometrics/psychometrics-scoring-d3-t0083"} diff --git a/data/seat-count/eval.jsonl b/data/seat-count/eval.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..27494d09f1df1ea0c2b3d9d6a7fc251d6872d283 --- /dev/null +++ b/data/seat-count/eval.jsonl @@ -0,0 +1,24 @@ +{"id": "seat-count-constituencies-d1-e0000", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "seed": 10000, "title": "3 constituencies, 4 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/seat-count/seat-count-constituencies-d1-e0000"} +{"id": "seat-count-highest-averages-d1-e0001", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "seed": 10001, "title": "7 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 7 seats.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 7 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/seat-count/seat-count-highest-averages-d1-e0001"} +{"id": "seat-count-largest-remainder-d1-e0002", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "seed": 10002, "title": "9 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 9 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/seat-count/seat-count-largest-remainder-d1-e0002"} +{"id": "seat-count-constituencies-d2-e0003", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "seed": 10003, "title": "5 constituencies, 6 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 3% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/seat-count/seat-count-constituencies-d2-e0003"} +{"id": "seat-count-highest-averages-d2-e0004", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "seed": 10004, "title": "17 seats by modified-sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 17 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 17 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/seat-count/seat-count-highest-averages-d2-e0004"} +{"id": "seat-count-largest-remainder-d2-e0005", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "seed": 10005, "title": "12 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 12 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 4% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/seat-count/seat-count-largest-remainder-d2-e0005"} +{"id": "seat-count-constituencies-d3-e0006", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "seed": 10006, "title": "7 constituencies, 7 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.4, 3, 5, 7, ...: the first divisor is 1.4 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 57 fixed constituency seats there are 4 levelling seats, 61 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 61 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 61, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/seat-count/seat-count-constituencies-d3-e0006"} +{"id": "seat-count-highest-averages-d3-e0007", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "seed": 10007, "title": "47 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 47 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 47 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were Sainte-Lague (divisors 1, 3, 5, 7, ...) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/seat-count/seat-count-highest-averages-d3-e0007"} +{"id": "seat-count-largest-remainder-d3-e0008", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "seed": 10008, "title": "15 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 15 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 5% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/seat-count/seat-count-largest-remainder-d3-e0008"} +{"id": "seat-count-constituencies-d1-e0009", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "seed": 10009, "title": "3 constituencies, 4 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/seat-count/seat-count-constituencies-d1-e0009"} +{"id": "seat-count-highest-averages-d1-e0010", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "seed": 10010, "title": "13 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 13 seats.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 13 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/seat-count/seat-count-highest-averages-d1-e0010"} +{"id": "seat-count-largest-remainder-d1-e0011", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "seed": 10011, "title": "7 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 7 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/seat-count/seat-count-largest-remainder-d1-e0011"} +{"id": "seat-count-constituencies-d2-e0012", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "seed": 10012, "title": "5 constituencies, 6 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/seat-count/seat-count-constituencies-d2-e0012"} +{"id": "seat-count-highest-averages-d2-e0013", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "seed": 10013, "title": "18 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 18 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 18 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/seat-count/seat-count-highest-averages-d2-e0013"} +{"id": "seat-count-largest-remainder-d2-e0014", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "seed": 10014, "title": "17 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 17 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 2% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/seat-count/seat-count-largest-remainder-d2-e0014"} +{"id": "seat-count-constituencies-d3-e0015", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "seed": 10015, "title": "7 constituencies, 7 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 51 fixed constituency seats there are 4 levelling seats, 55 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 55 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 55, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/seat-count/seat-count-constituencies-d3-e0015"} +{"id": "seat-count-highest-averages-d3-e0016", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "seed": 10016, "title": "32 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 32 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 32 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/seat-count/seat-count-highest-averages-d3-e0016"} +{"id": "seat-count-largest-remainder-d3-e0017", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "seed": 10017, "title": "24 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 24 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 2% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/seat-count/seat-count-largest-remainder-d3-e0017"} +{"id": "seat-count-constituencies-d1-e0018", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "seed": 10018, "title": "3 constituencies, 4 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/seat-count/seat-count-constituencies-d1-e0018"} +{"id": "seat-count-highest-averages-d1-e0019", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "seed": 10019, "title": "12 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 12 seats.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 12 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/seat-count/seat-count-highest-averages-d1-e0019"} +{"id": "seat-count-largest-remainder-d1-e0020", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "seed": 10020, "title": "9 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 9 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/seat-count/seat-count-largest-remainder-d1-e0020"} +{"id": "seat-count-constituencies-d2-e0021", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "seed": 10021, "title": "5 constituencies, 6 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/seat-count/seat-count-constituencies-d2-e0021"} +{"id": "seat-count-highest-averages-d2-e0022", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "seed": 10022, "title": "15 seats by modified-sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 15 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 15 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/seat-count/seat-count-highest-averages-d2-e0022"} +{"id": "seat-count-largest-remainder-d2-e0023", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "seed": 10023, "title": "24 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 24 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 3% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/seat-count/seat-count-largest-remainder-d2-e0023"} diff --git a/data/seat-count/train.jsonl b/data/seat-count/train.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..c947f5fcb67952bdccb660f74cd8986f1ee99144 --- /dev/null +++ b/data/seat-count/train.jsonl @@ -0,0 +1,84 @@ +{"id": "seat-count-constituencies-d1-t0000", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "seed": 0, "title": "3 constituencies, 4 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/seat-count/seat-count-constituencies-d1-t0000"} +{"id": "seat-count-highest-averages-d1-t0001", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "seed": 1, "title": "9 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 9 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 9 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0001"} +{"id": "seat-count-largest-remainder-d1-t0002", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "seed": 2, "title": "10 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 10 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0002"} +{"id": "seat-count-constituencies-d2-t0003", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "seed": 3, "title": "5 constituencies, 6 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/seat-count/seat-count-constituencies-d2-t0003"} +{"id": "seat-count-highest-averages-d2-t0004", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "seed": 4, "title": "24 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 24 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 24 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0004"} +{"id": "seat-count-largest-remainder-d2-t0005", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "seed": 5, "title": "15 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 15 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 2% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0005"} +{"id": "seat-count-constituencies-d3-t0006", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "seed": 6, "title": "7 constituencies, 7 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 3% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.4, 3, 5, 7, ...: the first divisor is 1.4 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 58 fixed constituency seats there are 9 levelling seats, 67 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 67 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 67, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/seat-count/seat-count-constituencies-d3-t0006"} +{"id": "seat-count-highest-averages-d3-t0007", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "seed": 7, "title": "44 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 44 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 44 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were modified Sainte-Lague (divisors 1.4, 3, 5, 7, ...: the first divisor is 1.4 instead of 1) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0007"} +{"id": "seat-count-largest-remainder-d3-t0008", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "seed": 8, "title": "15 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 15 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 3% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0008"} +{"id": "seat-count-constituencies-d1-t0009", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "seed": 9, "title": "3 constituencies, 4 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/seat-count/seat-count-constituencies-d1-t0009"} +{"id": "seat-count-highest-averages-d1-t0010", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "seed": 10, "title": "8 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 8 seats.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 8 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0010"} +{"id": "seat-count-largest-remainder-d1-t0011", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "seed": 11, "title": "12 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 12 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0011"} +{"id": "seat-count-constituencies-d2-t0012", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "seed": 12, "title": "5 constituencies, 6 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/seat-count/seat-count-constituencies-d2-t0012"} +{"id": "seat-count-highest-averages-d2-t0013", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "seed": 13, "title": "21 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 21 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 21 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0013"} +{"id": "seat-count-largest-remainder-d2-t0014", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "seed": 14, "title": "12 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 12 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 5% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0014"} +{"id": "seat-count-constituencies-d3-t0015", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "seed": 15, "title": "7 constituencies, 7 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 53 fixed constituency seats there are 4 levelling seats, 57 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 57 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 57, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/seat-count/seat-count-constituencies-d3-t0015"} +{"id": "seat-count-highest-averages-d3-t0016", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "seed": 16, "title": "26 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 26 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 26 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were D'Hondt (divisors 1, 2, 3, 4, ...) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0016"} +{"id": "seat-count-largest-remainder-d3-t0017", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "seed": 17, "title": "24 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 24 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 4% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0017"} +{"id": "seat-count-constituencies-d1-t0018", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "seed": 18, "title": "3 constituencies, 4 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/seat-count/seat-count-constituencies-d1-t0018"} +{"id": "seat-count-highest-averages-d1-t0019", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "seed": 19, "title": "12 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 12 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 12 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0019"} +{"id": "seat-count-largest-remainder-d1-t0020", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "seed": 20, "title": "7 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 7 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0020"} +{"id": "seat-count-constituencies-d2-t0021", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "seed": 21, "title": "5 constituencies, 6 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 3% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/seat-count/seat-count-constituencies-d2-t0021"} +{"id": "seat-count-highest-averages-d2-t0022", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "seed": 22, "title": "31 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 31 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 31 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0022"} +{"id": "seat-count-largest-remainder-d2-t0023", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "seed": 23, "title": "12 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 12 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 3% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0023"} +{"id": "seat-count-constituencies-d3-t0024", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "seed": 24, "title": "7 constituencies, 7 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.4, 3, 5, 7, ...: the first divisor is 1.4 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 56 fixed constituency seats there are 7 levelling seats, 63 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 63 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 63, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/seat-count/seat-count-constituencies-d3-t0024"} +{"id": "seat-count-highest-averages-d3-t0025", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "seed": 25, "title": "32 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 32 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 32 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were Sainte-Lague (divisors 1, 3, 5, 7, ...) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0025"} +{"id": "seat-count-largest-remainder-d3-t0026", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "seed": 26, "title": "28 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 28 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 5% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0026"} +{"id": "seat-count-constituencies-d1-t0027", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "seed": 27, "title": "3 constituencies, 4 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/seat-count/seat-count-constituencies-d1-t0027"} +{"id": "seat-count-highest-averages-d1-t0028", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "seed": 28, "title": "10 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 10 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 10 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0028"} +{"id": "seat-count-largest-remainder-d1-t0029", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "seed": 29, "title": "9 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 9 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0029"} +{"id": "seat-count-constituencies-d2-t0030", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "seed": 30, "title": "5 constituencies, 6 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/seat-count/seat-count-constituencies-d2-t0030"} +{"id": "seat-count-highest-averages-d2-t0031", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "seed": 31, "title": "26 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 26 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 26 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0031"} +{"id": "seat-count-largest-remainder-d2-t0032", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "seed": 32, "title": "24 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 24 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 2% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0032"} +{"id": "seat-count-constituencies-d3-t0033", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "seed": 33, "title": "7 constituencies, 7 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 55 fixed constituency seats there are 4 levelling seats, 59 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 59 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 59, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/seat-count/seat-count-constituencies-d3-t0033"} +{"id": "seat-count-highest-averages-d3-t0034", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "seed": 34, "title": "21 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 21 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 21 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were modified Sainte-Lague (divisors 1.4, 3, 5, 7, ...: the first divisor is 1.4 instead of 1) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0034"} +{"id": "seat-count-largest-remainder-d3-t0035", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "seed": 35, "title": "35 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 35 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 3% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Hare quota, Q = V / S (not rounded) instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0035"} +{"id": "seat-count-constituencies-d1-t0036", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "seed": 36, "title": "3 constituencies, 4 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/seat-count/seat-count-constituencies-d1-t0036"} +{"id": "seat-count-highest-averages-d1-t0037", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "seed": 37, "title": "11 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 11 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 11 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0037"} +{"id": "seat-count-largest-remainder-d1-t0038", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "seed": 38, "title": "7 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 7 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0038"} +{"id": "seat-count-constituencies-d2-t0039", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "seed": 39, "title": "5 constituencies, 6 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/seat-count/seat-count-constituencies-d2-t0039"} +{"id": "seat-count-highest-averages-d2-t0040", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "seed": 40, "title": "29 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 29 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 29 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0040"} +{"id": "seat-count-largest-remainder-d2-t0041", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "seed": 41, "title": "24 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 24 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 3% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0041"} +{"id": "seat-count-constituencies-d3-t0042", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "seed": 42, "title": "7 constituencies, 7 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 64 fixed constituency seats there are 5 levelling seats, 69 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 69 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 69, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/seat-count/seat-count-constituencies-d3-t0042"} +{"id": "seat-count-highest-averages-d3-t0043", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "seed": 43, "title": "43 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 43 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 43 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0043"} +{"id": "seat-count-largest-remainder-d3-t0044", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "seed": 44, "title": "36 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 36 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 5% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0044"} +{"id": "seat-count-constituencies-d1-t0045", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "seed": 45, "title": "3 constituencies, 4 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/seat-count/seat-count-constituencies-d1-t0045"} +{"id": "seat-count-highest-averages-d1-t0046", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "seed": 46, "title": "11 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 11 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 11 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0046"} +{"id": "seat-count-largest-remainder-d1-t0047", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "seed": 47, "title": "8 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 8 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0047"} +{"id": "seat-count-constituencies-d2-t0048", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "seed": 48, "title": "5 constituencies, 6 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/seat-count/seat-count-constituencies-d2-t0048"} +{"id": "seat-count-highest-averages-d2-t0049", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "seed": 49, "title": "21 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 21 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 21 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0049"} +{"id": "seat-count-largest-remainder-d2-t0050", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "seed": 50, "title": "26 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 26 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 2% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0050"} +{"id": "seat-count-constituencies-d3-t0051", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "seed": 51, "title": "7 constituencies, 7 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 51 fixed constituency seats there are 4 levelling seats, 55 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 55 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 55, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/seat-count/seat-count-constituencies-d3-t0051"} +{"id": "seat-count-highest-averages-d3-t0052", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "seed": 52, "title": "21 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 21 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 21 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were D'Hondt (divisors 1, 2, 3, 4, ...) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0052"} +{"id": "seat-count-largest-remainder-d3-t0053", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "seed": 53, "title": "34 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 34 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 5% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Hare quota, Q = V / S (not rounded) instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0053"} +{"id": "seat-count-constituencies-d1-t0054", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "seed": 54, "title": "3 constituencies, 4 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/seat-count/seat-count-constituencies-d1-t0054"} +{"id": "seat-count-highest-averages-d1-t0055", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "seed": 55, "title": "10 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 10 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 10 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0055"} +{"id": "seat-count-largest-remainder-d1-t0056", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "seed": 56, "title": "14 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 14 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0056"} +{"id": "seat-count-constituencies-d2-t0057", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "seed": 57, "title": "5 constituencies, 6 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 3% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/seat-count/seat-count-constituencies-d2-t0057"} +{"id": "seat-count-highest-averages-d2-t0058", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "seed": 58, "title": "29 seats by modified-sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 29 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 29 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0058"} +{"id": "seat-count-largest-remainder-d2-t0059", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "seed": 59, "title": "18 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 18 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 4% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0059"} +{"id": "seat-count-constituencies-d3-t0060", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "seed": 60, "title": "7 constituencies, 7 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 46 fixed constituency seats there are 7 levelling seats, 53 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 53 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 53, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/seat-count/seat-count-constituencies-d3-t0060"} +{"id": "seat-count-highest-averages-d3-t0061", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "seed": 61, "title": "31 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 31 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 31 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were D'Hondt (divisors 1, 2, 3, 4, ...) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0061"} +{"id": "seat-count-largest-remainder-d3-t0062", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "seed": 62, "title": "29 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 29 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 5% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0062"} +{"id": "seat-count-constituencies-d1-t0063", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "seed": 63, "title": "3 constituencies, 4 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/seat-count/seat-count-constituencies-d1-t0063"} +{"id": "seat-count-highest-averages-d1-t0064", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "seed": 64, "title": "13 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 13 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 13 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0064"} +{"id": "seat-count-largest-remainder-d1-t0065", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "seed": 65, "title": "10 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 10 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0065"} +{"id": "seat-count-constituencies-d2-t0066", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "seed": 66, "title": "5 constituencies, 6 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/seat-count/seat-count-constituencies-d2-t0066"} +{"id": "seat-count-highest-averages-d2-t0067", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "seed": 67, "title": "16 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 16 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 16 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0067"} +{"id": "seat-count-largest-remainder-d2-t0068", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "seed": 68, "title": "19 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 19 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 3% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0068"} +{"id": "seat-count-constituencies-d3-t0069", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "seed": 69, "title": "7 constituencies, 7 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 3% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 60 fixed constituency seats there are 9 levelling seats, 69 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 69 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 69, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/seat-count/seat-count-constituencies-d3-t0069"} +{"id": "seat-count-highest-averages-d3-t0070", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "seed": 70, "title": "36 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 36 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 36 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0070"} +{"id": "seat-count-largest-remainder-d3-t0071", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "seed": 71, "title": "23 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 23 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 2% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Hare quota, Q = V / S (not rounded) instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0071"} +{"id": "seat-count-constituencies-d1-t0072", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "seed": 72, "title": "3 constituencies, 4 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/seat-count/seat-count-constituencies-d1-t0072"} +{"id": "seat-count-highest-averages-d1-t0073", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "seed": 73, "title": "11 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 11 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 11 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0073"} +{"id": "seat-count-largest-remainder-d1-t0074", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "seed": 74, "title": "10 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 10 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0074"} +{"id": "seat-count-constituencies-d2-t0075", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "seed": 75, "title": "5 constituencies, 6 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/seat-count/seat-count-constituencies-d2-t0075"} +{"id": "seat-count-highest-averages-d2-t0076", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "seed": 76, "title": "18 seats by dhondt", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 18 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 18 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 20, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0076"} +{"id": "seat-count-largest-remainder-d2-t0077", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "seed": 77, "title": "20 seats by droop quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 20 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 2% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 18, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0077"} +{"id": "seat-count-constituencies-d3-t0078", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "seed": 78, "title": "7 constituencies, 7 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.4, 3, 5, 7, ...: the first divisor is 1.4 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 64 fixed constituency seats there are 7 levelling seats, 71 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 71 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 71, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 25, "path": "tasks/seat-count/seat-count-constituencies-d3-t0078"} +{"id": "seat-count-highest-averages-d3-t0079", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "seed": 79, "title": "39 seats by modified-sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 39 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.4, 3, 5, 7, ...: the first divisor is 1.4 instead of 1). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 39 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were Sainte-Lague (divisors 1, 3, 5, 7, ...) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 34, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0079"} +{"id": "seat-count-largest-remainder-d3-t0080", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "seed": 80, "title": "22 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 22 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 3% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 30, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0080"} +{"id": "seat-count-constituencies-d1-t0081", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "seed": 81, "title": "3 constituencies, 4 parties", "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 26, "path": "tasks/seat-count/seat-count-constituencies-d1-t0081"} +{"id": "seat-count-highest-averages-d1-t0082", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "seed": 82, "title": "7 seats by sainte-lague", "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 7 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 7 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 16, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0082"} +{"id": "seat-count-largest-remainder-d1-t0083", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "seed": 83, "title": "9 seats by hare quota", "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 9 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0083"} diff --git a/data/stand-inventory/eval.jsonl b/data/stand-inventory/eval.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..82263a80870487fe5fdcc9dda4e082e18c001135 --- /dev/null +++ b/data/stand-inventory/eval.jsonl @@ -0,0 +1,24 @@ +{"id": "stand-inventory-growth-d1-e0000", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "seed": 10000, "title": "Increment for 4 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-growth-d1-e0000"} +{"id": "stand-inventory-plots-d1-e0001", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "seed": 10001, "title": "Sample plot summary for 3 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Tallheden 4. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/stand-inventory/stand-inventory-plots-d1-e0001"} +{"id": "stand-inventory-thinning-d1-e0002", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "seed": 10002, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Kvarnmon 16. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-e0002"} +{"id": "stand-inventory-volume-d1-e0003", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "seed": 10003, "title": "Stand volume from 1 plot", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Granliden 27. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/stand-inventory/stand-inventory-volume-d1-e0003"} +{"id": "stand-inventory-growth-d2-e0004", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "seed": 10004, "title": "Increment for 6 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/stand-inventory/stand-inventory-growth-d2-e0004"} +{"id": "stand-inventory-plots-d2-e0005", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "seed": 10005, "title": "Sample plot summary for 5 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Norrmyran 12. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 24, "path": "tasks/stand-inventory/stand-inventory-plots-d2-e0005"} +{"id": "stand-inventory-thinning-d2-e0006", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "seed": 10006, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Granliden 27. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-e0006"} +{"id": "stand-inventory-volume-d2-e0007", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "seed": 10007, "title": "Stand volume from 3 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Storskogen 31. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-volume-d2-e0007"} +{"id": "stand-inventory-growth-d3-e0008", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "seed": 10008, "title": "Increment for 8 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/stand-inventory/stand-inventory-growth-d3-e0008"} +{"id": "stand-inventory-plots-d3-e0009", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "seed": 10009, "title": "Sample plot summary for 7 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Langtjarn 5. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 36, "path": "tasks/stand-inventory/stand-inventory-plots-d3-e0009"} +{"id": "stand-inventory-thinning-d3-e0010", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "seed": 10010, "title": "Thinning from below on a 600 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Bjorkbacken 8. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-e0010"} +{"id": "stand-inventory-volume-d3-e0011", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "seed": 10011, "title": "Stand volume from 4 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Tallheden 4. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/stand-inventory/stand-inventory-volume-d3-e0011"} +{"id": "stand-inventory-growth-d1-e0012", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "seed": 10012, "title": "Increment for 4 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-growth-d1-e0012"} +{"id": "stand-inventory-plots-d1-e0013", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "seed": 10013, "title": "Sample plot summary for 3 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Storskogen 31. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/stand-inventory/stand-inventory-plots-d1-e0013"} +{"id": "stand-inventory-thinning-d1-e0014", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "seed": 10014, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Ravasen 22. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-e0014"} +{"id": "stand-inventory-volume-d1-e0015", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "seed": 10015, "title": "Stand volume from 1 plot", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Langtjarn 5. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/stand-inventory/stand-inventory-volume-d1-e0015"} +{"id": "stand-inventory-growth-d2-e0016", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "seed": 10016, "title": "Increment for 6 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/stand-inventory/stand-inventory-growth-d2-e0016"} +{"id": "stand-inventory-plots-d2-e0017", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "seed": 10017, "title": "Sample plot summary for 5 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Storskogen 31. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 24, "path": "tasks/stand-inventory/stand-inventory-plots-d2-e0017"} +{"id": "stand-inventory-thinning-d2-e0018", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "seed": 10018, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Kvarnmon 16. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-e0018"} +{"id": "stand-inventory-volume-d2-e0019", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "seed": 10019, "title": "Stand volume from 3 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Kvarnmon 16. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-volume-d2-e0019"} +{"id": "stand-inventory-growth-d3-e0020", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "seed": 10020, "title": "Increment for 8 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/stand-inventory/stand-inventory-growth-d3-e0020"} +{"id": "stand-inventory-plots-d3-e0021", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "seed": 10021, "title": "Sample plot summary for 7 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Storskogen 31. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 36, "path": "tasks/stand-inventory/stand-inventory-plots-d3-e0021"} +{"id": "stand-inventory-thinning-d3-e0022", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "seed": 10022, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Langtjarn 5. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-e0022"} +{"id": "stand-inventory-volume-d3-e0023", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "seed": 10023, "title": "Stand volume from 4 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Granliden 27. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/stand-inventory/stand-inventory-volume-d3-e0023"} diff --git a/data/stand-inventory/train.jsonl b/data/stand-inventory/train.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..5cf9d8cfcad0a5833626e621657b208e90c67279 --- /dev/null +++ b/data/stand-inventory/train.jsonl @@ -0,0 +1,84 @@ +{"id": "stand-inventory-growth-d1-t0000", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "seed": 0, "title": "Increment for 4 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-growth-d1-t0000"} +{"id": "stand-inventory-plots-d1-t0001", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "seed": 1, "title": "Sample plot summary for 3 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Tallheden 4. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/stand-inventory/stand-inventory-plots-d1-t0001"} +{"id": "stand-inventory-thinning-d1-t0002", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "seed": 2, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Storskogen 31. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-t0002"} +{"id": "stand-inventory-volume-d1-t0003", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "seed": 3, "title": "Stand volume from 1 plot", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Storskogen 31. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 6, "path": "tasks/stand-inventory/stand-inventory-volume-d1-t0003"} +{"id": "stand-inventory-growth-d2-t0004", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "seed": 4, "title": "Increment for 6 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/stand-inventory/stand-inventory-growth-d2-t0004"} +{"id": "stand-inventory-plots-d2-t0005", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "seed": 5, "title": "Sample plot summary for 5 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Langtjarn 5. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 24, "path": "tasks/stand-inventory/stand-inventory-plots-d2-t0005"} +{"id": "stand-inventory-thinning-d2-t0006", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "seed": 6, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Langtjarn 5. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-t0006"} +{"id": "stand-inventory-volume-d2-t0007", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "seed": 7, "title": "Stand volume from 3 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Granliden 27. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-volume-d2-t0007"} +{"id": "stand-inventory-growth-d3-t0008", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "seed": 8, "title": "Increment for 8 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/stand-inventory/stand-inventory-growth-d3-t0008"} +{"id": "stand-inventory-plots-d3-t0009", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "seed": 9, "title": "Sample plot summary for 7 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Kvarnmon 16. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 36, "path": "tasks/stand-inventory/stand-inventory-plots-d3-t0009"} +{"id": "stand-inventory-thinning-d3-t0010", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "seed": 10, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Norrmyran 12. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-t0010"} +{"id": "stand-inventory-volume-d3-t0011", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "seed": 11, "title": "Stand volume from 4 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Kvarnmon 16. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/stand-inventory/stand-inventory-volume-d3-t0011"} +{"id": "stand-inventory-growth-d1-t0012", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "seed": 12, "title": "Increment for 4 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-growth-d1-t0012"} +{"id": "stand-inventory-plots-d1-t0013", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "seed": 13, "title": "Sample plot summary for 3 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Ravasen 22. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/stand-inventory/stand-inventory-plots-d1-t0013"} +{"id": "stand-inventory-thinning-d1-t0014", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "seed": 14, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Langtjarn 5. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-t0014"} +{"id": "stand-inventory-volume-d1-t0015", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "seed": 15, "title": "Stand volume from 1 plot", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Norrmyran 12. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/stand-inventory/stand-inventory-volume-d1-t0015"} +{"id": "stand-inventory-growth-d2-t0016", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "seed": 16, "title": "Increment for 6 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/stand-inventory/stand-inventory-growth-d2-t0016"} +{"id": "stand-inventory-plots-d2-t0017", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "seed": 17, "title": "Sample plot summary for 5 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Tallheden 4. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 24, "path": "tasks/stand-inventory/stand-inventory-plots-d2-t0017"} +{"id": "stand-inventory-thinning-d2-t0018", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "seed": 18, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Granliden 27. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-t0018"} +{"id": "stand-inventory-volume-d2-t0019", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "seed": 19, "title": "Stand volume from 3 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Storskogen 31. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-volume-d2-t0019"} +{"id": "stand-inventory-growth-d3-t0020", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "seed": 20, "title": "Increment for 8 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/stand-inventory/stand-inventory-growth-d3-t0020"} +{"id": "stand-inventory-plots-d3-t0021", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "seed": 21, "title": "Sample plot summary for 7 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Bjorkbacken 8. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 36, "path": "tasks/stand-inventory/stand-inventory-plots-d3-t0021"} +{"id": "stand-inventory-thinning-d3-t0022", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "seed": 22, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Bjorkbacken 8. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-t0022"} +{"id": "stand-inventory-volume-d3-t0023", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "seed": 23, "title": "Stand volume from 4 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Norrmyran 12. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/stand-inventory/stand-inventory-volume-d3-t0023"} +{"id": "stand-inventory-growth-d1-t0024", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "seed": 24, "title": "Increment for 4 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-growth-d1-t0024"} +{"id": "stand-inventory-plots-d1-t0025", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "seed": 25, "title": "Sample plot summary for 3 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Storskogen 31. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/stand-inventory/stand-inventory-plots-d1-t0025"} +{"id": "stand-inventory-thinning-d1-t0026", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "seed": 26, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Norrmyran 12. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-t0026"} +{"id": "stand-inventory-volume-d1-t0027", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "seed": 27, "title": "Stand volume from 1 plot", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Ravasen 22. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/stand-inventory/stand-inventory-volume-d1-t0027"} +{"id": "stand-inventory-growth-d2-t0028", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "seed": 28, "title": "Increment for 6 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/stand-inventory/stand-inventory-growth-d2-t0028"} +{"id": "stand-inventory-plots-d2-t0029", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "seed": 29, "title": "Sample plot summary for 5 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Norrmyran 12. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 24, "path": "tasks/stand-inventory/stand-inventory-plots-d2-t0029"} +{"id": "stand-inventory-thinning-d2-t0030", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "seed": 30, "title": "Thinning from below on a 500 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Langtjarn 5. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-t0030"} +{"id": "stand-inventory-volume-d2-t0031", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "seed": 31, "title": "Stand volume from 3 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Kvarnmon 16. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-volume-d2-t0031"} +{"id": "stand-inventory-growth-d3-t0032", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "seed": 32, "title": "Increment for 8 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/stand-inventory/stand-inventory-growth-d3-t0032"} +{"id": "stand-inventory-plots-d3-t0033", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "seed": 33, "title": "Sample plot summary for 7 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Langtjarn 5. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 36, "path": "tasks/stand-inventory/stand-inventory-plots-d3-t0033"} +{"id": "stand-inventory-thinning-d3-t0034", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "seed": 34, "title": "Thinning from below on a 600 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Ravasen 22. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-t0034"} +{"id": "stand-inventory-volume-d3-t0035", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "seed": 35, "title": "Stand volume from 4 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Langtjarn 5. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/stand-inventory/stand-inventory-volume-d3-t0035"} +{"id": "stand-inventory-growth-d1-t0036", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "seed": 36, "title": "Increment for 4 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-growth-d1-t0036"} +{"id": "stand-inventory-plots-d1-t0037", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "seed": 37, "title": "Sample plot summary for 3 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Ravasen 22. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/stand-inventory/stand-inventory-plots-d1-t0037"} +{"id": "stand-inventory-thinning-d1-t0038", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "seed": 38, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Bjorkbacken 8. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-t0038"} +{"id": "stand-inventory-volume-d1-t0039", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "seed": 39, "title": "Stand volume from 1 plot", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Tallheden 4. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 6, "path": "tasks/stand-inventory/stand-inventory-volume-d1-t0039"} +{"id": "stand-inventory-growth-d2-t0040", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "seed": 40, "title": "Increment for 6 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/stand-inventory/stand-inventory-growth-d2-t0040"} +{"id": "stand-inventory-plots-d2-t0041", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "seed": 41, "title": "Sample plot summary for 5 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Granliden 27. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 24, "path": "tasks/stand-inventory/stand-inventory-plots-d2-t0041"} +{"id": "stand-inventory-thinning-d2-t0042", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "seed": 42, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Bjorkbacken 8. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-t0042"} +{"id": "stand-inventory-volume-d2-t0043", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "seed": 43, "title": "Stand volume from 3 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Bjorkbacken 8. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-volume-d2-t0043"} +{"id": "stand-inventory-growth-d3-t0044", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "seed": 44, "title": "Increment for 8 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/stand-inventory/stand-inventory-growth-d3-t0044"} +{"id": "stand-inventory-plots-d3-t0045", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "seed": 45, "title": "Sample plot summary for 7 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Ravasen 22. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 36, "path": "tasks/stand-inventory/stand-inventory-plots-d3-t0045"} +{"id": "stand-inventory-thinning-d3-t0046", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "seed": 46, "title": "Thinning from below on a 500 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Langtjarn 5. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-t0046"} +{"id": "stand-inventory-volume-d3-t0047", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "seed": 47, "title": "Stand volume from 4 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Langtjarn 5. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/stand-inventory/stand-inventory-volume-d3-t0047"} +{"id": "stand-inventory-growth-d1-t0048", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "seed": 48, "title": "Increment for 4 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-growth-d1-t0048"} +{"id": "stand-inventory-plots-d1-t0049", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "seed": 49, "title": "Sample plot summary for 3 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Granliden 27. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/stand-inventory/stand-inventory-plots-d1-t0049"} +{"id": "stand-inventory-thinning-d1-t0050", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "seed": 50, "title": "Thinning from below on a 500 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Norrmyran 12. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-t0050"} +{"id": "stand-inventory-volume-d1-t0051", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "seed": 51, "title": "Stand volume from 1 plot", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Bjorkbacken 8. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 6, "path": "tasks/stand-inventory/stand-inventory-volume-d1-t0051"} +{"id": "stand-inventory-growth-d2-t0052", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "seed": 52, "title": "Increment for 6 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/stand-inventory/stand-inventory-growth-d2-t0052"} +{"id": "stand-inventory-plots-d2-t0053", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "seed": 53, "title": "Sample plot summary for 5 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Tallheden 4. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 24, "path": "tasks/stand-inventory/stand-inventory-plots-d2-t0053"} +{"id": "stand-inventory-thinning-d2-t0054", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "seed": 54, "title": "Thinning from below on a 800 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Ravasen 22. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-t0054"} +{"id": "stand-inventory-volume-d2-t0055", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "seed": 55, "title": "Stand volume from 3 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Langtjarn 5. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-volume-d2-t0055"} +{"id": "stand-inventory-growth-d3-t0056", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "seed": 56, "title": "Increment for 8 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/stand-inventory/stand-inventory-growth-d3-t0056"} +{"id": "stand-inventory-plots-d3-t0057", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "seed": 57, "title": "Sample plot summary for 7 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Norrmyran 12. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 36, "path": "tasks/stand-inventory/stand-inventory-plots-d3-t0057"} +{"id": "stand-inventory-thinning-d3-t0058", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "seed": 58, "title": "Thinning from below on a 600 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Langtjarn 5. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-t0058"} +{"id": "stand-inventory-volume-d3-t0059", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "seed": 59, "title": "Stand volume from 4 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Langtjarn 5. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/stand-inventory/stand-inventory-volume-d3-t0059"} +{"id": "stand-inventory-growth-d1-t0060", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "seed": 60, "title": "Increment for 4 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-growth-d1-t0060"} +{"id": "stand-inventory-plots-d1-t0061", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "seed": 61, "title": "Sample plot summary for 3 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Kvarnmon 16. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/stand-inventory/stand-inventory-plots-d1-t0061"} +{"id": "stand-inventory-thinning-d1-t0062", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "seed": 62, "title": "Thinning from below on a 500 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Ravasen 22. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-t0062"} +{"id": "stand-inventory-volume-d1-t0063", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "seed": 63, "title": "Stand volume from 1 plot", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Kvarnmon 16. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/stand-inventory/stand-inventory-volume-d1-t0063"} +{"id": "stand-inventory-growth-d2-t0064", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "seed": 64, "title": "Increment for 6 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/stand-inventory/stand-inventory-growth-d2-t0064"} +{"id": "stand-inventory-plots-d2-t0065", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "seed": 65, "title": "Sample plot summary for 5 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Langtjarn 5. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 24, "path": "tasks/stand-inventory/stand-inventory-plots-d2-t0065"} +{"id": "stand-inventory-thinning-d2-t0066", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "seed": 66, "title": "Thinning from below on a 600 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Storskogen 31. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-t0066"} +{"id": "stand-inventory-volume-d2-t0067", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "seed": 67, "title": "Stand volume from 3 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Storskogen 31. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-volume-d2-t0067"} +{"id": "stand-inventory-growth-d3-t0068", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "seed": 68, "title": "Increment for 8 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/stand-inventory/stand-inventory-growth-d3-t0068"} +{"id": "stand-inventory-plots-d3-t0069", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "seed": 69, "title": "Sample plot summary for 7 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Norrmyran 12. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 36, "path": "tasks/stand-inventory/stand-inventory-plots-d3-t0069"} +{"id": "stand-inventory-thinning-d3-t0070", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "seed": 70, "title": "Thinning from below on a 500 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Ravasen 22. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 10, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-t0070"} +{"id": "stand-inventory-volume-d3-t0071", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "seed": 71, "title": "Stand volume from 4 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Kvarnmon 16. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/stand-inventory/stand-inventory-volume-d3-t0071"} +{"id": "stand-inventory-growth-d1-t0072", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "seed": 72, "title": "Increment for 4 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-growth-d1-t0072"} +{"id": "stand-inventory-plots-d1-t0073", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "seed": 73, "title": "Sample plot summary for 3 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Bjorkbacken 8. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 15, "path": "tasks/stand-inventory/stand-inventory-plots-d1-t0073"} +{"id": "stand-inventory-thinning-d1-t0074", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "seed": 74, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Granliden 27. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-t0074"} +{"id": "stand-inventory-volume-d1-t0075", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "seed": 75, "title": "Stand volume from 1 plot", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Bjorkbacken 8. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 6, "path": "tasks/stand-inventory/stand-inventory-volume-d1-t0075"} +{"id": "stand-inventory-growth-d2-t0076", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "seed": 76, "title": "Increment for 6 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 13, "path": "tasks/stand-inventory/stand-inventory-growth-d2-t0076"} +{"id": "stand-inventory-plots-d2-t0077", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "seed": 77, "title": "Sample plot summary for 5 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Kvarnmon 16. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 24, "path": "tasks/stand-inventory/stand-inventory-plots-d2-t0077"} +{"id": "stand-inventory-thinning-d2-t0078", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "seed": 78, "title": "Thinning from below on a 500 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Granliden 27. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 7, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-t0078"} +{"id": "stand-inventory-volume-d2-t0079", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "seed": 79, "title": "Stand volume from 3 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Tallheden 4. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 9, "path": "tasks/stand-inventory/stand-inventory-volume-d2-t0079"} +{"id": "stand-inventory-growth-d3-t0080", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "seed": 80, "title": "Increment for 8 stands", "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 33, "path": "tasks/stand-inventory/stand-inventory-growth-d3-t0080"} +{"id": "stand-inventory-plots-d3-t0081", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "seed": 81, "title": "Sample plot summary for 7 plots", "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Ravasen 22. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 36, "path": "tasks/stand-inventory/stand-inventory-plots-d3-t0081"} +{"id": "stand-inventory-thinning-d3-t0082", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "seed": 82, "title": "Thinning from below on a 400 m2 plot", "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Bjorkbacken 8. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 11, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-t0082"} +{"id": "stand-inventory-volume-d3-t0083", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "seed": 83, "title": "Stand volume from 4 plots", "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Kvarnmon 16. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for.", "checks": 12, "path": "tasks/stand-inventory/stand-inventory-volume-d3-t0083"} diff --git a/data/ward-round/eval.jsonl b/data/ward-round/eval.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..5049a9edc2d742ed6fe2032d346d705419972694 --- /dev/null +++ b/data/ward-round/eval.jsonl @@ -0,0 +1,24 @@ +{"id": "ward-round-dosing-d1-e0000", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "seed": 10000, "title": "Doses and infusion rates for 4 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/ward-round/ward-round-dosing-d1-e0000"} +{"id": "ward-round-fluid-balance-d1-e0001", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "seed": 10001, "title": "Fluid balance for 3 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 10, "path": "tasks/ward-round/ward-round-fluid-balance-d1-e0001"} +{"id": "ward-round-news2-d1-e0002", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "seed": 10002, "title": "Early-warning scores for 5 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).", "checks": 11, "path": "tasks/ward-round/ward-round-news2-d1-e0002"} +{"id": "ward-round-dosing-d2-e0003", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "seed": 10003, "title": "Doses and infusion rates for 7 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 21, "path": "tasks/ward-round/ward-round-dosing-d2-e0003"} +{"id": "ward-round-fluid-balance-d2-e0004", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "seed": 10004, "title": "Fluid balance for 5 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 21, "path": "tasks/ward-round/ward-round-fluid-balance-d2-e0004"} +{"id": "ward-round-news2-d2-e0005", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "seed": 10005, "title": "Early-warning scores for 9 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 20, "path": "tasks/ward-round/ward-round-news2-d2-e0005"} +{"id": "ward-round-dosing-d3-e0006", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "seed": 10006, "title": "Doses and infusion rates for 10 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/ward-round/ward-round-dosing-d3-e0006"} +{"id": "ward-round-fluid-balance-d3-e0007", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "seed": 10007, "title": "Fluid balance for 8 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 33, "path": "tasks/ward-round/ward-round-fluid-balance-d3-e0007"} +{"id": "ward-round-news2-d3-e0008", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "seed": 10008, "title": "Early-warning scores for 14 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 30, "path": "tasks/ward-round/ward-round-news2-d3-e0008"} +{"id": "ward-round-dosing-d1-e0009", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "seed": 10009, "title": "Doses and infusion rates for 4 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/ward-round/ward-round-dosing-d1-e0009"} +{"id": "ward-round-fluid-balance-d1-e0010", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "seed": 10010, "title": "Fluid balance for 3 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 10, "path": "tasks/ward-round/ward-round-fluid-balance-d1-e0010"} +{"id": "ward-round-news2-d1-e0011", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "seed": 10011, "title": "Early-warning scores for 5 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).", "checks": 11, "path": "tasks/ward-round/ward-round-news2-d1-e0011"} +{"id": "ward-round-dosing-d2-e0012", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "seed": 10012, "title": "Doses and infusion rates for 7 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 21, "path": "tasks/ward-round/ward-round-dosing-d2-e0012"} +{"id": "ward-round-fluid-balance-d2-e0013", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "seed": 10013, "title": "Fluid balance for 5 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 21, "path": "tasks/ward-round/ward-round-fluid-balance-d2-e0013"} +{"id": "ward-round-news2-d2-e0014", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "seed": 10014, "title": "Early-warning scores for 9 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 20, "path": "tasks/ward-round/ward-round-news2-d2-e0014"} +{"id": "ward-round-dosing-d3-e0015", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "seed": 10015, "title": "Doses and infusion rates for 10 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/ward-round/ward-round-dosing-d3-e0015"} +{"id": "ward-round-fluid-balance-d3-e0016", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "seed": 10016, "title": "Fluid balance for 8 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 33, "path": "tasks/ward-round/ward-round-fluid-balance-d3-e0016"} +{"id": "ward-round-news2-d3-e0017", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "seed": 10017, "title": "Early-warning scores for 14 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 30, "path": "tasks/ward-round/ward-round-news2-d3-e0017"} +{"id": "ward-round-dosing-d1-e0018", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "seed": 10018, "title": "Doses and infusion rates for 4 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/ward-round/ward-round-dosing-d1-e0018"} +{"id": "ward-round-fluid-balance-d1-e0019", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "seed": 10019, "title": "Fluid balance for 3 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 10, "path": "tasks/ward-round/ward-round-fluid-balance-d1-e0019"} +{"id": "ward-round-news2-d1-e0020", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "seed": 10020, "title": "Early-warning scores for 5 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).", "checks": 11, "path": "tasks/ward-round/ward-round-news2-d1-e0020"} +{"id": "ward-round-dosing-d2-e0021", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "seed": 10021, "title": "Doses and infusion rates for 7 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 21, "path": "tasks/ward-round/ward-round-dosing-d2-e0021"} +{"id": "ward-round-fluid-balance-d2-e0022", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "seed": 10022, "title": "Fluid balance for 5 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 21, "path": "tasks/ward-round/ward-round-fluid-balance-d2-e0022"} +{"id": "ward-round-news2-d2-e0023", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "seed": 10023, "title": "Early-warning scores for 9 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 20, "path": "tasks/ward-round/ward-round-news2-d2-e0023"} diff --git a/data/ward-round/train.jsonl b/data/ward-round/train.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..2391d3c963604f7176652a1f588a2ff7c9bfb482 --- /dev/null +++ b/data/ward-round/train.jsonl @@ -0,0 +1,84 @@ +{"id": "ward-round-dosing-d1-t0000", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "seed": 0, "title": "Doses and infusion rates for 4 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/ward-round/ward-round-dosing-d1-t0000"} +{"id": "ward-round-fluid-balance-d1-t0001", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "seed": 1, "title": "Fluid balance for 3 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 10, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0001"} +{"id": "ward-round-news2-d1-t0002", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "seed": 2, "title": "Early-warning scores for 5 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).", "checks": 11, "path": "tasks/ward-round/ward-round-news2-d1-t0002"} +{"id": "ward-round-dosing-d2-t0003", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "seed": 3, "title": "Doses and infusion rates for 7 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 21, "path": "tasks/ward-round/ward-round-dosing-d2-t0003"} +{"id": "ward-round-fluid-balance-d2-t0004", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "seed": 4, "title": "Fluid balance for 5 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 21, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0004"} +{"id": "ward-round-news2-d2-t0005", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "seed": 5, "title": "Early-warning scores for 9 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 20, "path": "tasks/ward-round/ward-round-news2-d2-t0005"} +{"id": "ward-round-dosing-d3-t0006", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "seed": 6, "title": "Doses and infusion rates for 10 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/ward-round/ward-round-dosing-d3-t0006"} +{"id": "ward-round-fluid-balance-d3-t0007", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "seed": 7, "title": "Fluid balance for 8 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 33, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0007"} +{"id": "ward-round-news2-d3-t0008", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "seed": 8, "title": "Early-warning scores for 14 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 30, "path": "tasks/ward-round/ward-round-news2-d3-t0008"} +{"id": "ward-round-dosing-d1-t0009", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "seed": 9, "title": "Doses and infusion rates for 4 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/ward-round/ward-round-dosing-d1-t0009"} +{"id": "ward-round-fluid-balance-d1-t0010", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "seed": 10, "title": "Fluid balance for 3 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 10, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0010"} +{"id": "ward-round-news2-d1-t0011", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "seed": 11, "title": "Early-warning scores for 5 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).", "checks": 11, "path": "tasks/ward-round/ward-round-news2-d1-t0011"} +{"id": "ward-round-dosing-d2-t0012", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "seed": 12, "title": "Doses and infusion rates for 7 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 21, "path": "tasks/ward-round/ward-round-dosing-d2-t0012"} +{"id": "ward-round-fluid-balance-d2-t0013", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "seed": 13, "title": "Fluid balance for 5 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 21, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0013"} +{"id": "ward-round-news2-d2-t0014", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "seed": 14, "title": "Early-warning scores for 9 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 20, "path": "tasks/ward-round/ward-round-news2-d2-t0014"} +{"id": "ward-round-dosing-d3-t0015", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "seed": 15, "title": "Doses and infusion rates for 10 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/ward-round/ward-round-dosing-d3-t0015"} +{"id": "ward-round-fluid-balance-d3-t0016", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "seed": 16, "title": "Fluid balance for 8 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 33, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0016"} +{"id": "ward-round-news2-d3-t0017", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "seed": 17, "title": "Early-warning scores for 14 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 30, "path": "tasks/ward-round/ward-round-news2-d3-t0017"} +{"id": "ward-round-dosing-d1-t0018", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "seed": 18, "title": "Doses and infusion rates for 4 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/ward-round/ward-round-dosing-d1-t0018"} +{"id": "ward-round-fluid-balance-d1-t0019", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "seed": 19, "title": "Fluid balance for 3 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 10, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0019"} +{"id": "ward-round-news2-d1-t0020", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "seed": 20, "title": "Early-warning scores for 5 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).", "checks": 11, "path": "tasks/ward-round/ward-round-news2-d1-t0020"} +{"id": "ward-round-dosing-d2-t0021", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "seed": 21, "title": "Doses and infusion rates for 7 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 21, "path": "tasks/ward-round/ward-round-dosing-d2-t0021"} +{"id": "ward-round-fluid-balance-d2-t0022", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "seed": 22, "title": "Fluid balance for 5 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 21, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0022"} +{"id": "ward-round-news2-d2-t0023", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "seed": 23, "title": "Early-warning scores for 9 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 20, "path": "tasks/ward-round/ward-round-news2-d2-t0023"} +{"id": "ward-round-dosing-d3-t0024", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "seed": 24, "title": "Doses and infusion rates for 10 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/ward-round/ward-round-dosing-d3-t0024"} +{"id": "ward-round-fluid-balance-d3-t0025", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "seed": 25, "title": "Fluid balance for 8 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 33, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0025"} +{"id": "ward-round-news2-d3-t0026", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "seed": 26, "title": "Early-warning scores for 14 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 30, "path": "tasks/ward-round/ward-round-news2-d3-t0026"} +{"id": "ward-round-dosing-d1-t0027", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "seed": 27, "title": "Doses and infusion rates for 4 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/ward-round/ward-round-dosing-d1-t0027"} +{"id": "ward-round-fluid-balance-d1-t0028", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "seed": 28, "title": "Fluid balance for 3 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 10, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0028"} +{"id": "ward-round-news2-d1-t0029", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "seed": 29, "title": "Early-warning scores for 5 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).", "checks": 11, "path": "tasks/ward-round/ward-round-news2-d1-t0029"} +{"id": "ward-round-dosing-d2-t0030", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "seed": 30, "title": "Doses and infusion rates for 7 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 21, "path": "tasks/ward-round/ward-round-dosing-d2-t0030"} +{"id": "ward-round-fluid-balance-d2-t0031", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "seed": 31, "title": "Fluid balance for 5 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 21, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0031"} +{"id": "ward-round-news2-d2-t0032", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "seed": 32, "title": "Early-warning scores for 9 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 20, "path": "tasks/ward-round/ward-round-news2-d2-t0032"} +{"id": "ward-round-dosing-d3-t0033", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "seed": 33, "title": "Doses and infusion rates for 10 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/ward-round/ward-round-dosing-d3-t0033"} +{"id": "ward-round-fluid-balance-d3-t0034", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "seed": 34, "title": "Fluid balance for 8 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 33, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0034"} +{"id": "ward-round-news2-d3-t0035", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "seed": 35, "title": "Early-warning scores for 14 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 30, "path": "tasks/ward-round/ward-round-news2-d3-t0035"} +{"id": "ward-round-dosing-d1-t0036", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "seed": 36, "title": "Doses and infusion rates for 4 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/ward-round/ward-round-dosing-d1-t0036"} +{"id": "ward-round-fluid-balance-d1-t0037", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "seed": 37, "title": "Fluid balance for 3 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 10, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0037"} +{"id": "ward-round-news2-d1-t0038", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "seed": 38, "title": "Early-warning scores for 5 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).", "checks": 11, "path": "tasks/ward-round/ward-round-news2-d1-t0038"} +{"id": "ward-round-dosing-d2-t0039", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "seed": 39, "title": "Doses and infusion rates for 7 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 21, "path": "tasks/ward-round/ward-round-dosing-d2-t0039"} +{"id": "ward-round-fluid-balance-d2-t0040", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "seed": 40, "title": "Fluid balance for 5 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 21, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0040"} +{"id": "ward-round-news2-d2-t0041", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "seed": 41, "title": "Early-warning scores for 9 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 20, "path": "tasks/ward-round/ward-round-news2-d2-t0041"} +{"id": "ward-round-dosing-d3-t0042", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "seed": 42, "title": "Doses and infusion rates for 10 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/ward-round/ward-round-dosing-d3-t0042"} +{"id": "ward-round-fluid-balance-d3-t0043", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "seed": 43, "title": "Fluid balance for 8 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 33, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0043"} +{"id": "ward-round-news2-d3-t0044", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "seed": 44, "title": "Early-warning scores for 14 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 30, "path": "tasks/ward-round/ward-round-news2-d3-t0044"} +{"id": "ward-round-dosing-d1-t0045", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "seed": 45, "title": "Doses and infusion rates for 4 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/ward-round/ward-round-dosing-d1-t0045"} +{"id": "ward-round-fluid-balance-d1-t0046", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "seed": 46, "title": "Fluid balance for 3 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 10, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0046"} +{"id": "ward-round-news2-d1-t0047", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "seed": 47, "title": "Early-warning scores for 5 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).", "checks": 11, "path": "tasks/ward-round/ward-round-news2-d1-t0047"} +{"id": "ward-round-dosing-d2-t0048", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "seed": 48, "title": "Doses and infusion rates for 7 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 21, "path": "tasks/ward-round/ward-round-dosing-d2-t0048"} +{"id": "ward-round-fluid-balance-d2-t0049", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "seed": 49, "title": "Fluid balance for 5 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 21, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0049"} +{"id": "ward-round-news2-d2-t0050", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "seed": 50, "title": "Early-warning scores for 9 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 20, "path": "tasks/ward-round/ward-round-news2-d2-t0050"} +{"id": "ward-round-dosing-d3-t0051", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "seed": 51, "title": "Doses and infusion rates for 10 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/ward-round/ward-round-dosing-d3-t0051"} +{"id": "ward-round-fluid-balance-d3-t0052", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "seed": 52, "title": "Fluid balance for 8 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 33, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0052"} +{"id": "ward-round-news2-d3-t0053", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "seed": 53, "title": "Early-warning scores for 14 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 30, "path": "tasks/ward-round/ward-round-news2-d3-t0053"} +{"id": "ward-round-dosing-d1-t0054", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "seed": 54, "title": "Doses and infusion rates for 4 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/ward-round/ward-round-dosing-d1-t0054"} +{"id": "ward-round-fluid-balance-d1-t0055", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "seed": 55, "title": "Fluid balance for 3 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 10, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0055"} +{"id": "ward-round-news2-d1-t0056", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "seed": 56, "title": "Early-warning scores for 5 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).", "checks": 11, "path": "tasks/ward-round/ward-round-news2-d1-t0056"} +{"id": "ward-round-dosing-d2-t0057", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "seed": 57, "title": "Doses and infusion rates for 7 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 21, "path": "tasks/ward-round/ward-round-dosing-d2-t0057"} +{"id": "ward-round-fluid-balance-d2-t0058", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "seed": 58, "title": "Fluid balance for 5 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 21, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0058"} +{"id": "ward-round-news2-d2-t0059", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "seed": 59, "title": "Early-warning scores for 9 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 20, "path": "tasks/ward-round/ward-round-news2-d2-t0059"} +{"id": "ward-round-dosing-d3-t0060", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "seed": 60, "title": "Doses and infusion rates for 10 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/ward-round/ward-round-dosing-d3-t0060"} +{"id": "ward-round-fluid-balance-d3-t0061", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "seed": 61, "title": "Fluid balance for 8 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 33, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0061"} +{"id": "ward-round-news2-d3-t0062", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "seed": 62, "title": "Early-warning scores for 14 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 30, "path": "tasks/ward-round/ward-round-news2-d3-t0062"} +{"id": "ward-round-dosing-d1-t0063", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "seed": 63, "title": "Doses and infusion rates for 4 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/ward-round/ward-round-dosing-d1-t0063"} +{"id": "ward-round-fluid-balance-d1-t0064", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "seed": 64, "title": "Fluid balance for 3 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 10, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0064"} +{"id": "ward-round-news2-d1-t0065", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "seed": 65, "title": "Early-warning scores for 5 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).", "checks": 11, "path": "tasks/ward-round/ward-round-news2-d1-t0065"} +{"id": "ward-round-dosing-d2-t0066", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "seed": 66, "title": "Doses and infusion rates for 7 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 21, "path": "tasks/ward-round/ward-round-dosing-d2-t0066"} +{"id": "ward-round-fluid-balance-d2-t0067", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "seed": 67, "title": "Fluid balance for 5 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 21, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0067"} +{"id": "ward-round-news2-d2-t0068", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "seed": 68, "title": "Early-warning scores for 9 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 20, "path": "tasks/ward-round/ward-round-news2-d2-t0068"} +{"id": "ward-round-dosing-d3-t0069", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "seed": 69, "title": "Doses and infusion rates for 10 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/ward-round/ward-round-dosing-d3-t0069"} +{"id": "ward-round-fluid-balance-d3-t0070", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "seed": 70, "title": "Fluid balance for 8 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 33, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0070"} +{"id": "ward-round-news2-d3-t0071", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "seed": 71, "title": "Early-warning scores for 14 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 30, "path": "tasks/ward-round/ward-round-news2-d3-t0071"} +{"id": "ward-round-dosing-d1-t0072", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "seed": 72, "title": "Doses and infusion rates for 4 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/ward-round/ward-round-dosing-d1-t0072"} +{"id": "ward-round-fluid-balance-d1-t0073", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "seed": 73, "title": "Fluid balance for 3 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 10, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0073"} +{"id": "ward-round-news2-d1-t0074", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "seed": 74, "title": "Early-warning scores for 5 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).", "checks": 11, "path": "tasks/ward-round/ward-round-news2-d1-t0074"} +{"id": "ward-round-dosing-d2-t0075", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "seed": 75, "title": "Doses and infusion rates for 7 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 21, "path": "tasks/ward-round/ward-round-dosing-d2-t0075"} +{"id": "ward-round-fluid-balance-d2-t0076", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "seed": 76, "title": "Fluid balance for 5 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 21, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0076"} +{"id": "ward-round-news2-d2-t0077", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "seed": 77, "title": "Early-warning scores for 9 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 20, "path": "tasks/ward-round/ward-round-news2-d2-t0077"} +{"id": "ward-round-dosing-d3-t0078", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "seed": 78, "title": "Doses and infusion rates for 10 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 40, "path": "tasks/ward-round/ward-round-dosing-d3-t0078"} +{"id": "ward-round-fluid-balance-d3-t0079", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "seed": 79, "title": "Fluid balance for 8 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 33, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0079"} +{"id": "ward-round-news2-d3-t0080", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "seed": 80, "title": "Early-warning scores for 14 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.", "checks": 30, "path": "tasks/ward-round/ward-round-news2-d3-t0080"} +{"id": "ward-round-dosing-d1-t0081", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "seed": 81, "title": "Doses and infusion rates for 4 orders", "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for.", "checks": 8, "path": "tasks/ward-round/ward-round-dosing-d1-t0081"} +{"id": "ward-round-fluid-balance-d1-t0082", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "seed": 82, "title": "Fluid balance for 3 patients", "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none).", "checks": 10, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0082"} +{"id": "ward-round-news2-d1-t0083", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "seed": 83, "title": "Early-warning scores for 5 patients", "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).", "checks": 11, "path": "tasks/ward-round/ward-round-news2-d1-t0083"} diff --git a/data/zoning-check/eval.jsonl b/data/zoning-check/eval.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..b0f7f2fdc83a46b2b452e5dcc54ee88f83b5b40b --- /dev/null +++ b/data/zoning-check/eval.jsonl @@ -0,0 +1,24 @@ +{"id": "zoning-check-capacity-d1-e0000", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "seed": 10000, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 15, "path": "tasks/zoning-check/zoning-check-capacity-d1-e0000"} +{"id": "zoning-check-compliance-d1-e0001", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "seed": 10001, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 12, "path": "tasks/zoning-check/zoning-check-compliance-d1-e0001"} +{"id": "zoning-check-geometry-d1-e0002", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "seed": 10002, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 9, "path": "tasks/zoning-check/zoning-check-geometry-d1-e0002"} +{"id": "zoning-check-mixed-use-d1-e0003", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "seed": 10003, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 12, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-e0003"} +{"id": "zoning-check-capacity-d2-e0004", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "seed": 10004, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 20, "path": "tasks/zoning-check/zoning-check-capacity-d2-e0004"} +{"id": "zoning-check-compliance-d2-e0005", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "seed": 10005, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 16, "path": "tasks/zoning-check/zoning-check-compliance-d2-e0005"} +{"id": "zoning-check-geometry-d2-e0006", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "seed": 10006, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 12, "path": "tasks/zoning-check/zoning-check-geometry-d2-e0006"} +{"id": "zoning-check-mixed-use-d2-e0007", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "seed": 10007, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 16, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-e0007"} +{"id": "zoning-check-capacity-d3-e0008", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "seed": 10008, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 25, "path": "tasks/zoning-check/zoning-check-capacity-d3-e0008"} +{"id": "zoning-check-compliance-d3-e0009", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "seed": 10009, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 20, "path": "tasks/zoning-check/zoning-check-compliance-d3-e0009"} +{"id": "zoning-check-geometry-d3-e0010", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "seed": 10010, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 15, "path": "tasks/zoning-check/zoning-check-geometry-d3-e0010"} +{"id": "zoning-check-mixed-use-d3-e0011", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "seed": 10011, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 20, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-e0011"} +{"id": "zoning-check-capacity-d1-e0012", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "seed": 10012, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 15, "path": "tasks/zoning-check/zoning-check-capacity-d1-e0012"} +{"id": "zoning-check-compliance-d1-e0013", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "seed": 10013, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 12, "path": "tasks/zoning-check/zoning-check-compliance-d1-e0013"} +{"id": "zoning-check-geometry-d1-e0014", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "seed": 10014, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 9, "path": "tasks/zoning-check/zoning-check-geometry-d1-e0014"} +{"id": "zoning-check-mixed-use-d1-e0015", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "seed": 10015, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 12, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-e0015"} +{"id": "zoning-check-capacity-d2-e0016", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "seed": 10016, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 20, "path": "tasks/zoning-check/zoning-check-capacity-d2-e0016"} +{"id": "zoning-check-compliance-d2-e0017", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "seed": 10017, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 16, "path": "tasks/zoning-check/zoning-check-compliance-d2-e0017"} +{"id": "zoning-check-geometry-d2-e0018", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "seed": 10018, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 12, "path": "tasks/zoning-check/zoning-check-geometry-d2-e0018"} +{"id": "zoning-check-mixed-use-d2-e0019", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "seed": 10019, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 16, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-e0019"} +{"id": "zoning-check-capacity-d3-e0020", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "seed": 10020, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 25, "path": "tasks/zoning-check/zoning-check-capacity-d3-e0020"} +{"id": "zoning-check-compliance-d3-e0021", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "seed": 10021, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 20, "path": "tasks/zoning-check/zoning-check-compliance-d3-e0021"} +{"id": "zoning-check-geometry-d3-e0022", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "seed": 10022, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 15, "path": "tasks/zoning-check/zoning-check-geometry-d3-e0022"} +{"id": "zoning-check-mixed-use-d3-e0023", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "seed": 10023, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 20, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-e0023"} diff --git a/data/zoning-check/train.jsonl b/data/zoning-check/train.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..2dfd66dd7237b84cb4d387a183d8f21aa4328469 --- /dev/null +++ b/data/zoning-check/train.jsonl @@ -0,0 +1,84 @@ +{"id": "zoning-check-capacity-d1-t0000", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "seed": 0, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 15, "path": "tasks/zoning-check/zoning-check-capacity-d1-t0000"} +{"id": "zoning-check-compliance-d1-t0001", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "seed": 1, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 12, "path": "tasks/zoning-check/zoning-check-compliance-d1-t0001"} +{"id": "zoning-check-geometry-d1-t0002", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "seed": 2, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 9, "path": "tasks/zoning-check/zoning-check-geometry-d1-t0002"} +{"id": "zoning-check-mixed-use-d1-t0003", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "seed": 3, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 12, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-t0003"} +{"id": "zoning-check-capacity-d2-t0004", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "seed": 4, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 20, "path": "tasks/zoning-check/zoning-check-capacity-d2-t0004"} +{"id": "zoning-check-compliance-d2-t0005", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "seed": 5, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 16, "path": "tasks/zoning-check/zoning-check-compliance-d2-t0005"} +{"id": "zoning-check-geometry-d2-t0006", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "seed": 6, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 12, "path": "tasks/zoning-check/zoning-check-geometry-d2-t0006"} +{"id": "zoning-check-mixed-use-d2-t0007", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "seed": 7, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 16, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-t0007"} +{"id": "zoning-check-capacity-d3-t0008", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "seed": 8, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 25, "path": "tasks/zoning-check/zoning-check-capacity-d3-t0008"} +{"id": "zoning-check-compliance-d3-t0009", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "seed": 9, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 20, "path": "tasks/zoning-check/zoning-check-compliance-d3-t0009"} +{"id": "zoning-check-geometry-d3-t0010", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "seed": 10, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 15, "path": "tasks/zoning-check/zoning-check-geometry-d3-t0010"} +{"id": "zoning-check-mixed-use-d3-t0011", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "seed": 11, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 20, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-t0011"} +{"id": "zoning-check-capacity-d1-t0012", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "seed": 12, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 15, "path": "tasks/zoning-check/zoning-check-capacity-d1-t0012"} +{"id": "zoning-check-compliance-d1-t0013", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "seed": 13, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 12, "path": "tasks/zoning-check/zoning-check-compliance-d1-t0013"} +{"id": "zoning-check-geometry-d1-t0014", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "seed": 14, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 9, "path": "tasks/zoning-check/zoning-check-geometry-d1-t0014"} +{"id": "zoning-check-mixed-use-d1-t0015", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "seed": 15, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 12, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-t0015"} +{"id": "zoning-check-capacity-d2-t0016", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "seed": 16, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 20, "path": "tasks/zoning-check/zoning-check-capacity-d2-t0016"} +{"id": "zoning-check-compliance-d2-t0017", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "seed": 17, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 16, "path": "tasks/zoning-check/zoning-check-compliance-d2-t0017"} +{"id": "zoning-check-geometry-d2-t0018", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "seed": 18, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 12, "path": "tasks/zoning-check/zoning-check-geometry-d2-t0018"} +{"id": "zoning-check-mixed-use-d2-t0019", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "seed": 19, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 16, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-t0019"} +{"id": "zoning-check-capacity-d3-t0020", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "seed": 20, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 25, "path": "tasks/zoning-check/zoning-check-capacity-d3-t0020"} +{"id": "zoning-check-compliance-d3-t0021", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "seed": 21, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 20, "path": "tasks/zoning-check/zoning-check-compliance-d3-t0021"} +{"id": "zoning-check-geometry-d3-t0022", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "seed": 22, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 15, "path": "tasks/zoning-check/zoning-check-geometry-d3-t0022"} +{"id": "zoning-check-mixed-use-d3-t0023", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "seed": 23, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 20, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-t0023"} +{"id": "zoning-check-capacity-d1-t0024", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "seed": 24, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 15, "path": "tasks/zoning-check/zoning-check-capacity-d1-t0024"} +{"id": "zoning-check-compliance-d1-t0025", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "seed": 25, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 12, "path": "tasks/zoning-check/zoning-check-compliance-d1-t0025"} +{"id": "zoning-check-geometry-d1-t0026", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "seed": 26, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 9, "path": "tasks/zoning-check/zoning-check-geometry-d1-t0026"} +{"id": "zoning-check-mixed-use-d1-t0027", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "seed": 27, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 12, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-t0027"} +{"id": "zoning-check-capacity-d2-t0028", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "seed": 28, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 20, "path": "tasks/zoning-check/zoning-check-capacity-d2-t0028"} +{"id": "zoning-check-compliance-d2-t0029", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "seed": 29, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 16, "path": "tasks/zoning-check/zoning-check-compliance-d2-t0029"} +{"id": "zoning-check-geometry-d2-t0030", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "seed": 30, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 12, "path": "tasks/zoning-check/zoning-check-geometry-d2-t0030"} +{"id": "zoning-check-mixed-use-d2-t0031", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "seed": 31, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 16, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-t0031"} +{"id": "zoning-check-capacity-d3-t0032", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "seed": 32, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 25, "path": "tasks/zoning-check/zoning-check-capacity-d3-t0032"} +{"id": "zoning-check-compliance-d3-t0033", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "seed": 33, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 20, "path": "tasks/zoning-check/zoning-check-compliance-d3-t0033"} +{"id": "zoning-check-geometry-d3-t0034", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "seed": 34, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 15, "path": "tasks/zoning-check/zoning-check-geometry-d3-t0034"} +{"id": "zoning-check-mixed-use-d3-t0035", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "seed": 35, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 20, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-t0035"} +{"id": "zoning-check-capacity-d1-t0036", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "seed": 36, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 15, "path": "tasks/zoning-check/zoning-check-capacity-d1-t0036"} +{"id": "zoning-check-compliance-d1-t0037", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "seed": 37, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 12, "path": "tasks/zoning-check/zoning-check-compliance-d1-t0037"} +{"id": "zoning-check-geometry-d1-t0038", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "seed": 38, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 9, "path": "tasks/zoning-check/zoning-check-geometry-d1-t0038"} +{"id": "zoning-check-mixed-use-d1-t0039", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "seed": 39, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 12, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-t0039"} +{"id": "zoning-check-capacity-d2-t0040", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "seed": 40, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 20, "path": "tasks/zoning-check/zoning-check-capacity-d2-t0040"} +{"id": "zoning-check-compliance-d2-t0041", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "seed": 41, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 16, "path": "tasks/zoning-check/zoning-check-compliance-d2-t0041"} +{"id": "zoning-check-geometry-d2-t0042", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "seed": 42, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 12, "path": "tasks/zoning-check/zoning-check-geometry-d2-t0042"} +{"id": "zoning-check-mixed-use-d2-t0043", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "seed": 43, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 16, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-t0043"} +{"id": "zoning-check-capacity-d3-t0044", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "seed": 44, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 25, "path": "tasks/zoning-check/zoning-check-capacity-d3-t0044"} +{"id": "zoning-check-compliance-d3-t0045", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "seed": 45, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 20, "path": "tasks/zoning-check/zoning-check-compliance-d3-t0045"} +{"id": "zoning-check-geometry-d3-t0046", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "seed": 46, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 15, "path": "tasks/zoning-check/zoning-check-geometry-d3-t0046"} +{"id": "zoning-check-mixed-use-d3-t0047", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "seed": 47, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 20, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-t0047"} +{"id": "zoning-check-capacity-d1-t0048", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "seed": 48, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 15, "path": "tasks/zoning-check/zoning-check-capacity-d1-t0048"} +{"id": "zoning-check-compliance-d1-t0049", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "seed": 49, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 12, "path": "tasks/zoning-check/zoning-check-compliance-d1-t0049"} +{"id": "zoning-check-geometry-d1-t0050", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "seed": 50, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 9, "path": "tasks/zoning-check/zoning-check-geometry-d1-t0050"} +{"id": "zoning-check-mixed-use-d1-t0051", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "seed": 51, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 12, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-t0051"} +{"id": "zoning-check-capacity-d2-t0052", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "seed": 52, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 20, "path": "tasks/zoning-check/zoning-check-capacity-d2-t0052"} +{"id": "zoning-check-compliance-d2-t0053", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "seed": 53, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 16, "path": "tasks/zoning-check/zoning-check-compliance-d2-t0053"} +{"id": "zoning-check-geometry-d2-t0054", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "seed": 54, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 12, "path": "tasks/zoning-check/zoning-check-geometry-d2-t0054"} +{"id": "zoning-check-mixed-use-d2-t0055", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "seed": 55, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 16, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-t0055"} +{"id": "zoning-check-capacity-d3-t0056", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "seed": 56, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 25, "path": "tasks/zoning-check/zoning-check-capacity-d3-t0056"} +{"id": "zoning-check-compliance-d3-t0057", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "seed": 57, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 20, "path": "tasks/zoning-check/zoning-check-compliance-d3-t0057"} +{"id": "zoning-check-geometry-d3-t0058", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "seed": 58, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 15, "path": "tasks/zoning-check/zoning-check-geometry-d3-t0058"} +{"id": "zoning-check-mixed-use-d3-t0059", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "seed": 59, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 20, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-t0059"} +{"id": "zoning-check-capacity-d1-t0060", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "seed": 60, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 15, "path": "tasks/zoning-check/zoning-check-capacity-d1-t0060"} +{"id": "zoning-check-compliance-d1-t0061", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "seed": 61, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 12, "path": "tasks/zoning-check/zoning-check-compliance-d1-t0061"} +{"id": "zoning-check-geometry-d1-t0062", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "seed": 62, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 9, "path": "tasks/zoning-check/zoning-check-geometry-d1-t0062"} +{"id": "zoning-check-mixed-use-d1-t0063", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "seed": 63, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 12, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-t0063"} +{"id": "zoning-check-capacity-d2-t0064", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "seed": 64, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 20, "path": "tasks/zoning-check/zoning-check-capacity-d2-t0064"} +{"id": "zoning-check-compliance-d2-t0065", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "seed": 65, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 16, "path": "tasks/zoning-check/zoning-check-compliance-d2-t0065"} +{"id": "zoning-check-geometry-d2-t0066", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "seed": 66, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 12, "path": "tasks/zoning-check/zoning-check-geometry-d2-t0066"} +{"id": "zoning-check-mixed-use-d2-t0067", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "seed": 67, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 16, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-t0067"} +{"id": "zoning-check-capacity-d3-t0068", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "seed": 68, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 25, "path": "tasks/zoning-check/zoning-check-capacity-d3-t0068"} +{"id": "zoning-check-compliance-d3-t0069", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "seed": 69, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 20, "path": "tasks/zoning-check/zoning-check-compliance-d3-t0069"} +{"id": "zoning-check-geometry-d3-t0070", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "seed": 70, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 15, "path": "tasks/zoning-check/zoning-check-geometry-d3-t0070"} +{"id": "zoning-check-mixed-use-d3-t0071", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "seed": 71, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 20, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-t0071"} +{"id": "zoning-check-capacity-d1-t0072", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "seed": 72, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 15, "path": "tasks/zoning-check/zoning-check-capacity-d1-t0072"} +{"id": "zoning-check-compliance-d1-t0073", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "seed": 73, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 12, "path": "tasks/zoning-check/zoning-check-compliance-d1-t0073"} +{"id": "zoning-check-geometry-d1-t0074", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "seed": 74, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 9, "path": "tasks/zoning-check/zoning-check-geometry-d1-t0074"} +{"id": "zoning-check-mixed-use-d1-t0075", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "seed": 75, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 12, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-t0075"} +{"id": "zoning-check-capacity-d2-t0076", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "seed": 76, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 20, "path": "tasks/zoning-check/zoning-check-capacity-d2-t0076"} +{"id": "zoning-check-compliance-d2-t0077", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "seed": 77, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 16, "path": "tasks/zoning-check/zoning-check-compliance-d2-t0077"} +{"id": "zoning-check-geometry-d2-t0078", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "seed": 78, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 12, "path": "tasks/zoning-check/zoning-check-geometry-d2-t0078"} +{"id": "zoning-check-mixed-use-d2-t0079", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "seed": 79, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 16, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-t0079"} +{"id": "zoning-check-capacity-d3-t0080", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "seed": 80, "title": "Planning review: capacity", "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.", "checks": 25, "path": "tasks/zoning-check/zoning-check-capacity-d3-t0080"} +{"id": "zoning-check-compliance-d3-t0081", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "seed": 81, "title": "Planning review: compliance", "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).", "checks": 20, "path": "tasks/zoning-check/zoning-check-compliance-d3-t0081"} +{"id": "zoning-check-geometry-d3-t0082", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "seed": 82, "title": "Planning review: geometry", "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).", "checks": 15, "path": "tasks/zoning-check/zoning-check-geometry-d3-t0082"} +{"id": "zoning-check-mixed-use-d3-t0083", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "seed": 83, "title": "Planning review: mixed-use", "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.", "checks": 20, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-t0083"} diff --git a/environments.json b/environments.json new file mode 100644 index 0000000000000000000000000000000000000000..68d9faa45be570e0dcfc8a1fe1697a67def71800 --- /dev/null +++ b/environments.json @@ -0,0 +1,259 @@ +[ + { + "name": "argument-check", + "title": "Argument Check", + "isced": "0223", + "summary": "Mark a logic problem sheet: test arguments for validity, sentence sets for consistency and formula pairs for equivalence, with counterexamples and normal forms.", + "task_type": "formal logic checking", + "good_for": [ + "Exhaustive truth-table reasoning", + "Parsing a formal syntax with stated precedence", + "Answers that must be verified, not guessed" + ], + "families": [ + "validity", + "consistency", + "equivalence" + ], + "tasks": 108, + "folder": "argument_check" + }, + { + "name": "class-test", + "title": "Class Test", + "isced": "0111", + "summary": "Analyse a class test as a teacher would: mark answer sheets, run item and distractor analysis, and standardise or moderate the marks.", + "task_type": "assessment analysis", + "good_for": [ + "Classical test theory on small classes", + "Applying a marking scheme exactly", + "Counting and filtering tabular records" + ], + "families": [ + "marking", + "item-analysis", + "distractors", + "moderation" + ], + "tasks": 108, + "folder": "class_test" + }, + { + "name": "emissions-inventory", + "title": "Emissions Inventory", + "isced": "0521", + "summary": "Compile a greenhouse-gas inventory from activity records: unit conversion, emission factors, scopes, CO2e from several gases, trends and data cleaning.", + "task_type": "emissions accounting", + "good_for": [ + "Unit conversion and table lookup before aggregation", + "Using supplied factors rather than remembered ones", + "Cleaning duplicated and missing records by a stated rule" + ], + "families": [ + "activity-data", + "multi-gas", + "time-series", + "data-quality" + ], + "tasks": 108, + "folder": "emissions_inventory" + }, + { + "name": "exposure-assessment", + "title": "Exposure Assessment", + "isced": "1022", + "summary": "Do an occupational hygienist's sums from workplace records: noise dose, airborne chemical averages, hand-arm vibration and injury rates against given limits.", + "task_type": "exposure calculation", + "good_for": [ + "Logarithmic and root-sum-square arithmetic on logs", + "Filtering records by a written definition", + "Comparing results with supplied limit values" + ], + "families": [ + "noise", + "chemicals", + "vibration", + "incidents" + ], + "tasks": 108, + "folder": "exposure_assessment" + }, + { + "name": "harris-matrix", + "title": "Harris Matrix", + "isced": "0222", + "summary": "Work an excavation archive after the dig: order the contexts, reduce the Harris matrix, date deposits from finds and find impossible relations.", + "task_type": "stratigraphic analysis", + "good_for": [ + "Reasoning over partial orders from tabular records", + "Applying a written recording convention exactly", + "Answers checked by a constraint validator" + ], + "families": [ + "sequence", + "reduction", + "dating", + "errors" + ], + "tasks": 108, + "folder": "harris_matrix" + }, + { + "name": "life-table", + "title": "Life Table", + "isced": "0314", + "summary": "Do a demographer's core calculations from population registers: life tables, fertility rates, age-standardised death rates and age-structure indicators.", + "task_type": "demographic calculation", + "good_for": [ + "Chained column-by-column calculations", + "Applying a methods note exactly", + "Aggregating and filtering register tables" + ], + "families": [ + "life-table", + "fertility", + "standardisation", + "age-structure" + ], + "tasks": 108, + "folder": "life_table" + }, + { + "name": "means-test", + "title": "Means Test", + "isced": "0923", + "summary": "Apply a written (fictional) benefit regulation to household case files: entitlement, mid-month changes, overpayments and review of past decisions.", + "task_type": "benefit assessment", + "good_for": [ + "Applying a rule document to case files", + "Multi-step money arithmetic with caps and disregards", + "Auditing earlier decisions" + ], + "families": [ + "entitlement", + "change", + "overpayment", + "review" + ], + "tasks": 108, + "folder": "means_test" + }, + { + "name": "price-index", + "title": "Price Index", + "isced": "0311", + "summary": "Compute an economic statistician's measures from raw tables: price indices, real GDP and chain-linked volumes, inequality and poverty, and inflation contributions.", + "task_type": "economic statistics calculation", + "good_for": [ + "Index-number formulas applied exactly", + "Unit and currency conversion in tabular data", + "Multi-step aggregation with graded reward" + ], + "families": [ + "basket-indices", + "national-accounts", + "income-distribution", + "inflation-contributions" + ], + "tasks": 108, + "folder": "price_index" + }, + { + "name": "psychometrics", + "title": "Psychometrics", + "isced": "0313", + "summary": "Score questionnaires from a manual, judge reliable change, convert raw scores with norm tables and compute scale reliability, as a psychologist's assistant.", + "task_type": "psychometric scoring", + "good_for": [ + "Applying a scoring manual exactly", + "Statistics on small clinical data sets", + "Handling missing data by a stated rule" + ], + "families": [ + "scoring", + "reliable-change", + "norms", + "reliability" + ], + "tasks": 108, + "folder": "psychometrics" + }, + { + "name": "seat-count", + "title": "Seat Count", + "isced": "0312", + "summary": "Turn election results into seats: apply thresholds, divisor and quota methods, constituency and levelling seats, and measure disproportionality.", + "task_type": "electoral seat allocation", + "good_for": [ + "Applying a written allocation rule exactly", + "Aggregating and filtering count records", + "Multi-step procedures with graded reward" + ], + "families": [ + "highest-averages", + "largest-remainder", + "constituencies" + ], + "tasks": 108, + "folder": "seat_count" + }, + { + "name": "stand-inventory", + "title": "Stand Inventory", + "isced": "0821", + "summary": "Do a forester's office work after a field inventory: plot expansion, basal area, tree and stand volume, a thinning rule and increment.", + "task_type": "forest mensuration", + "good_for": [ + "Applying supplied equations to tallied records", + "Filtering and unit conversion before aggregation", + "Rule-following selection with a deterministic tie-break" + ], + "families": [ + "plots", + "volume", + "thinning", + "growth" + ], + "tasks": 108, + "folder": "stand_inventory" + }, + { + "name": "ward-round", + "title": "Ward Round", + "isced": "0913", + "summary": "Do a nurse's bedside calculations from ward charts: early-warning scores, infusion rates, weight-based doses and 24-hour fluid balance.", + "task_type": "clinical calculation", + "good_for": [ + "Careful multi-step arithmetic on tabular records", + "Applying a written scoring rule exactly", + "Small-model RL with graded reward" + ], + "families": [ + "news2", + "dosing", + "fluid-balance" + ], + "tasks": 108, + "folder": "ward_round" + }, + { + "name": "zoning-check", + "title": "Zoning Check", + "isced": "0731", + "summary": "Check building proposals against a fictional town's zoning code: floor area ratio, coverage, setbacks, parking, plot capacity and areas from coordinates.", + "task_type": "rule compliance check", + "good_for": [ + "Applying a written code to structured records", + "Plane geometry from coordinate lists", + "Finding the binding constraint among several limits" + ], + "families": [ + "compliance", + "capacity", + "geometry", + "mixed-use" + ], + "tasks": 108, + "folder": "zoning_check" + } +] \ No newline at end of file diff --git a/envs/__init__.py b/envs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/envs/argument_check/__init__.py b/envs/argument_check/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/envs/argument_check/env.toml b/envs/argument_check/env.toml new file mode 100644 index 0000000000000000000000000000000000000000..487c355cab73d67da7950e3d1d76e1482f043c31 --- /dev/null +++ b/envs/argument_check/env.toml @@ -0,0 +1,7 @@ +name = "argument-check" +title = "Argument Check" +isced = "0223" +summary = "Mark a logic problem sheet: test arguments for validity, sentence sets for consistency and formula pairs for equivalence, with counterexamples and normal forms." +task_type = "formal logic checking" +good_for = ["Exhaustive truth-table reasoning", "Parsing a formal syntax with stated precedence", "Answers that must be verified, not guessed"] +families = ["validity", "consistency", "equivalence"] diff --git a/envs/argument_check/gen.py b/envs/argument_check/gen.py new file mode 100644 index 0000000000000000000000000000000000000000..253df0895c09a960114499397b3a0f1426567273 --- /dev/null +++ b/envs/argument_check/gen.py @@ -0,0 +1,551 @@ +"""Argument Check (ISCED-F 0223 Philosophy and ethics). + +Classical two-valued propositional logic as taught in a first logic course. Three task families: + validity for each argument: valid or not, truth-table row counts, and a counterexample valuation if invalid + consistency for each set of sentences: satisfiable or not, number of models, a model if there is one + equivalence for each pair of formulas: equivalent or not, model counts, a distinguishing valuation; + at higher difficulty also a conjunctive (and disjunctive) normal form of given formulas + +Definitions are the standard ones (e.g. forall x: An Introduction to Formal Logic, P. D. Magnus, chapters on +truth tables; an argument is valid iff no valuation makes every premise true and the conclusion false; a set is +jointly satisfiable iff some valuation makes every member true; two sentences are equivalent iff they agree on +every valuation). The plain-text syntax and its precedence (~, &, |, ->, <-> from tightest to loosest, -> and +<-> grouping to the right) are this environment's own convention and are shipped with every task in +logic_reference.md, so nothing depends on a textbook's choice of symbols. + +This module builds formulas as trees, prints them, and computes every expected value from the trees. +oracle.py and validators.py each have their own, separately written parser and evaluator. +""" +import itertools +from practice.core import Task, rng_for, to_json, c_int, c_bool, c_set, c_str, c_custom + +ENV = "argument-check" + +REFERENCE = """# Logic reference + +## Formulas + +- An atom is a single capital letter, `A` to `Z`. +- `~X` means not X. +- `X & Y` means X and Y. +- `X | Y` means X or Y (inclusive: one or the other or both). +- `X -> Y` means if X then Y. +- `X <-> Y` means X if and only if Y. +- Parentheses `(` and `)` group. Spaces between symbols are optional and carry no meaning. + +## Reading a formula that is not fully parenthesised + +The connectives bind in this order, from tightest to loosest: `~`, then `&`, then `|`, then `->`, then `<->`. + +- `~` applies to the shortest formula that follows it: an atom, a parenthesised formula or another negation. So `~A & B` is `(~A) & B`. +- `A & B | C` is `(A & B) | C`, and `A | B & C` is `A | (B & C)`. +- `A | B -> C & D` is `(A | B) -> (C & D)`. +- `A -> B <-> C` is `(A -> B) <-> C`. +- `&` and `|` group to the left: `A & B & C` is `(A & B) & C`. +- `->` and `<->` group to the right: `A -> B -> C` is `A -> (B -> C)`, and `A <-> B <-> C` is `A <-> (B <-> C)`. + +## Truth conditions + +| X | Y | ~X | X & Y | X \\| Y | X -> Y | X <-> Y | +|---|---|---|---|---|---|---| +| true | true | false | true | true | true | true | +| true | false | false | false | true | false | false | +| false | true | true | false | true | true | false | +| false | false | true | false | false | true | true | + +## Valuations and rows + +A valuation gives each atom the value true or false. For one problem (one argument, one set of sentences or one pair of formulas) the atoms that occur are the atoms that appear in at least one of its formulas. The truth table of the problem has one row for each valuation of the atoms that occur: 2 to the power n rows for n atoms. Every count of rows or valuations asked for is a count over this table. + +In `answer.json` a valuation is a JSON object whose keys are exactly the atoms that occur in the problem and whose values are the JSON booleans `true` and `false`, for example `{"A": true, "B": false}`. Leave no atom out and add none. + +## Definitions + +- An argument is **valid** if there is no row in which every premise is true and the conclusion is false. Otherwise it is invalid, and any such row is a **counterexample**. An argument whose premises are never all true together is therefore valid. +- A premise of a valid argument is **essential** if the argument becomes invalid when that one premise is deleted and the others are kept. +- A set of sentences is **satisfiable** (consistent) if at least one row makes every sentence in it true. Such a row is a **model** of the set. +- An atom is **forced true** by a satisfiable set if it is true in every model of the set, and **forced false** if it is false in every model. +- Two formulas are **equivalent** if they have the same truth value in every row. A row in which they differ is a **distinguishing valuation**. +- A **literal** is an atom or `~` followed by an atom (`~~A` is not a literal). +- A formula is in **conjunctive normal form (CNF)** if, once parsed by the rules above, it is a conjunction (`&`) of one or more clauses, where each clause is a disjunction (`|`) of one or more literals. `(A | ~B) & C` and `A | B` and `~A` are in CNF. `A | B & C` is not: it parses as `A | (B & C)`. `->` and `<->` do not occur in a CNF. +- A formula is in **disjunctive normal form (DNF)** if, once parsed, it is a disjunction (`|`) of one or more terms, where each term is a conjunction (`&`) of one or more literals. `A & ~B | C` and `A & B` are in DNF. +""" + +# ---------------------------------------------------------------- formulas +# A formula is an atom (a one-letter string) or a tuple: ("~", x) or (op, x, y) with op in & | -> <->. +PREC = {"<->": 1, "->": 2, "|": 3, "&": 4} +RIGHT = ("->", "<->") + +def tokenize(s): + out, i = [], 0 + while i < len(s): + ch = s[i] + if ch in " \t": i += 1 + elif s.startswith("<->", i): out.append("<->"); i += 3 + elif s.startswith("->", i): out.append("->"); i += 2 + elif ch in "~&|()" or ("A" <= ch <= "Z"): out.append(ch); i += 1 + else: raise ValueError("bad character %r" % ch) + return out + +def parse(s): + """Recursive descent: iff := imp [<-> iff]; imp := or [-> imp]; or := and {| and}; and := neg {& neg}.""" + toks = tokenize(s); pos = [0] + def peek(): return toks[pos[0]] if pos[0] < len(toks) else None + def take(): pos[0] += 1; return toks[pos[0] - 1] + def p_iff(): + left = p_imp() + if peek() == "<->": take(); return ("<->", left, p_iff()) + return left + def p_imp(): + left = p_or() + if peek() == "->": take(); return ("->", left, p_imp()) + return left + def p_or(): + left = p_and() + while peek() == "|": take(); left = ("|", left, p_and()) + return left + def p_and(): + left = p_neg() + while peek() == "&": take(); left = ("&", left, p_neg()) + return left + def p_neg(): + t = peek() + if t == "~": take(); return ("~", p_neg()) + if t == "(": + take(); x = p_iff() + if peek() != ")": raise ValueError("missing )") + take(); return x + if t is not None and len(t) == 1 and "A" <= t <= "Z": return take() + raise ValueError("unexpected %r" % (t,)) + f = p_iff() + if pos[0] != len(toks): raise ValueError("trailing input") + return f + +def ev(f, v): + if isinstance(f, str): return v[f] + if f[0] == "~": return not ev(f[1], v) + a, b = ev(f[1], v), ev(f[2], v) + if f[0] == "&": return a and b + if f[0] == "|": return a or b + if f[0] == "->": return (not a) or b + return a == b + +def atoms_of(fs): + acc = set() + def walk(f): + if isinstance(f, str): acc.add(f) + else: + for x in f[1:]: walk(x) + for f in fs: walk(f) + return sorted(acc) + +def table(atoms): + return [dict(zip(atoms, bits)) for bits in itertools.product((True, False), repeat=len(atoms))] + +def show(f, style="lean", r=None): + """Print a tree. 'full' brackets every two-place subformula; 'lean' uses only the brackets the precedence + rules need (plus a few harmless extra ones when an rng is given). Either way parse(show(f)) == f.""" + if isinstance(f, str): return f + if f[0] == "~": + x = f[1]; inner = show(x, style, r) + return "~" + (inner if isinstance(x, str) or x[0] == "~" else "(" + inner + ")") + op, parts = f[0], [] + for side in (0, 1): + x = f[1 + side]; s = show(x, style, r) + if not isinstance(x, str) and x[0] != "~": + if style == "full": need = True + else: + need = PREC[x[0]] < PREC[op] or (PREC[x[0]] == PREC[op] and ((op in RIGHT) == (side == 0))) + if not need and r is not None and r.random() < 0.2: need = True + if need: s = "(" + s + ")" + parts.append(s) + return parts[0] + " " + op + " " + parts[1] + +def depth(f): + return 0 if isinstance(f, str) else 1 + max(depth(x) for x in f[1:]) + +def neg(x): + return x[1] if (not isinstance(x, str) and x[0] == "~") else ("~", x) + +def rand_formula(r, atoms, d): + """Random formula of depth at most d (a negated atom counts as depth 0 here).""" + if d <= 0: + a = r.choice(atoms) + return ("~", a) if r.random() < 0.3 else a + op = r.choices(["&", "|", "->", "<->", "~"], weights=[3, 3, 3, 1.5, 1.5])[0] + if op == "~": + return neg(rand_formula(r, atoms, d - 1)) + for attempt in range(200): + a, b = rand_formula(r, atoms, d - 1), rand_formula(r, atoms, r.randint(0, d - 1)) + if r.random() < 0.5: a, b = b, a + if a == b or a == neg(b): continue + # avoid padding such as J & (J | L), where one side is a literal whose atom the other side already uses + if attempt < 100 and any(is_literal(x) and atoms_of([x])[0] in atoms_of([y]) for x, y in ((a, b), (b, a))): continue + return (op, a, b) + return (op, a, b) + +def contingent(f): + vals = [ev(f, v) for v in table(atoms_of([f]))] + return any(vals) and not all(vals) + +# ---------------------------------------------------------------- the formulas behind the answers +def arg_stats(premises, conclusion): + """(atoms, rows with all premises true, rows with all premises true and the conclusion false).""" + atoms = atoms_of(premises + [conclusion]); p = c = 0 + for v in table(atoms): + if all(ev(x, v) for x in premises): + p += 1 + if not ev(conclusion, v): c += 1 + return atoms, p, c + +def essential_premises(premises, conclusion): + """1-based numbers of the premises whose deletion on its own makes a valid argument invalid.""" + return [i + 1 for i in range(len(premises)) if arg_stats(premises[:i] + premises[i + 1:], conclusion)[2] > 0] + +def set_stats(sentences): + """models, most sentences true together, atoms forced true / false (satisfiable sets), and the sentence + numbers whose deletion on its own leaves a satisfiable set (unsatisfiable sets).""" + atoms = atoms_of(sentences); rows = table(atoms) + models = [v for v in rows if all(ev(s, v) for s in sentences)] + most = max(sum(1 for s in sentences if ev(s, v)) for v in rows) + ft = [a for a in atoms if models and all(v[a] for v in models)] + ff = [a for a in atoms if models and not any(v[a] for v in models)] + restoring = [] + if not models: + for i in range(len(sentences)): + rest = sentences[:i] + sentences[i + 1:] + if any(all(ev(s, v) for s in rest) for v in rows): restoring.append(i + 1) + return {"atoms": atoms, "models": len(models), "most": most, "forced_true": ft, "forced_false": ff, "restoring": restoring} + +def pair_stats(left, right): + atoms = atoms_of([left, right]); lm = rm = lo = ro = 0 + for v in table(atoms): + a, b = ev(left, v), ev(right, v) + lm += a; rm += b; lo += (a and not b); ro += (b and not a) + rel = "equivalent" if lo == 0 and ro == 0 else "left-entails-right" if lo == 0 else "right-entails-left" if ro == 0 else "neither" + return {"atoms": atoms, "left_models": lm, "right_models": rm, "left_only": lo, "right_only": ro, "relation": rel} + +def is_literal(f): + return isinstance(f, str) or (f[0] == "~" and isinstance(f[1], str)) + +def is_normal_form(f, form): + outer, inner = ("&", "|") if form == "cnf" else ("|", "&") + def flat(x, op): + return flat(x[1], op) + flat(x[2], op) if (not isinstance(x, str) and x[0] == op) else [x] + return all(is_literal(lit) for part in flat(f, outer) for lit in flat(part, inner)) + +# ---------------------------------------------------------------- shared generation helpers +POOL = "ABCDEFGHJKLMNPQRST" + +def printer(r, d): + """Difficulty 1 prints every bracket; 2 and 3 rely on precedence; 3 also drops the spaces now and then.""" + def out(f): + if d == 1: s = show(f, "full") + else: + s = show(f, "lean", r) + if d == 3 and r.random() < 0.2: s = s.replace(" ", "") + assert parse(s) == f, s + return s + return out + +# ---------------------------------------------------------------- validity +def T(premises, conclusion): return ([parse(p) for p in premises], parse(conclusion)) +VALID_FORMS = [T(["X -> Y", "X"], "Y"), T(["X -> Y", "~Y"], "~X"), T(["X -> Y", "Y -> Z"], "X -> Z"), T(["X | Y", "~X"], "Y"), + T(["X | Y", "X -> Z", "Y -> Z"], "Z"), T(["X | Y", "X -> Z", "Y -> W"], "Z | W"), T(["X <-> Y", "~X"], "~Y"), + T(["X -> Y", "X -> Z"], "X -> Y & Z"), T(["X -> Y", "X -> ~Y"], "~X"), T(["X & Y -> Z", "X"], "Y -> Z"), + T(["~(X & Y)", "X"], "~Y"), T(["X -> (Y -> Z)", "Y"], "X -> Z"), T(["X -> Y", "~X -> Z"], "Y | Z"), + T(["X -> Y | Z", "~Y"], "X -> Z")] +OTHER_FORMS = [T(["X -> Y", "Y"], "X"), T(["X -> Y", "~X"], "~Y"), T(["X | Y", "X"], "~Y"), T(["X -> Y", "Z -> Y"], "X -> Z"), + T(["~(X & Y)", "~X"], "Y"), T(["X -> Y", "Y -> Z"], "Z -> X"), T(["X -> Y | Z", "~Y"], "~X"), + T(["X <-> Y", "X | Z"], "Y"), T(["X -> Y", "X -> Z"], "Y -> Z"), T(["X & Y -> Z", "~Z"], "~X"), + T(["X | Y", "X -> Z"], "Z"), T(["X -> Y", "~Y | Z"], "Z -> X")] + +def subst(f, m): + if isinstance(f, str): return m[f] + if f[0] == "~": return neg(subst(f[1], m)) + return (f[0], subst(f[1], m), subst(f[2], m)) + +def gen_validity(seed, d): + r = rng_for(ENV + "/validity", seed, d) + n = {1: 5, 2: 8, 3: 9}[d] + lo, hi = {1: (2, 3), 2: (3, 4), 3: (4, 6)}[d] + out = printer(r, d) + n_valid = n // 2 + (1 if n % 2 and r.random() < 0.5 else 0) + kinds = ["valid"] * n_valid + ["invalid"] * (n - n_valid) + if d == 3 and r.random() < 0.7: kinds[0] = "vacuous" # premises that cannot all be true: valid, with 0 premise rows + r.shuffle(kinds) + letters = sorted(r.sample(POOL, hi)) + args, seen = [], set() + for kind in kinds: + while True: + atoms = sorted(r.sample(letters, r.randint(lo, hi))) + if r.random() < 0.6 and kind != "vacuous": + prem, concl = r.choice(VALID_FORMS if kind == "valid" else OTHER_FORMS) + metas = atoms_of(prem + [concl]); m = {} + for x in metas: + for _ in range(20): # distinct parts that are not each other's negation + g = rand_formula(r, atoms, 0 if d == 1 else r.choice([0, 0, 1])) + if g not in m.values() and neg(g) not in m.values(): m[x] = g; break + if len(m) < len(metas): continue + prem, concl = [subst(p, m) for p in prem], subst(concl, m) + if d == 3 and r.random() < 0.5: prem.append(rand_formula(r, atoms, r.choice([1, 2]))) + r.shuffle(prem) + else: + k = {1: 2, 2: r.choice([2, 3]), 3: r.choice([3, 4])}[d] + prem = [rand_formula(r, atoms, 1 if d == 1 else r.choice([1, 2])) for _ in range(k)] + concl = rand_formula(r, atoms, r.choice([0, 1]) if d == 1 else 1) + if not all(contingent(p) for p in prem) or not contingent(concl): continue + if concl in prem or len(set(prem)) < len(prem): continue + used, p_rows, cex = arg_stats(prem, concl) + if not (lo <= len(used) <= hi) or depth(concl) > 3 or any(depth(p) > 3 for p in prem): continue + if kind == "valid" and not (cex == 0 and p_rows >= 1): continue + if kind == "vacuous" and not (p_rows == 0 and len(prem) >= 3 and len(essential_premises(prem, concl)) >= 1): continue + if kind == "invalid" and not (1 <= cex <= max(1, 2 ** len(used) // 4)): continue + if kind == "valid" and len(prem) > 1 and all(arg_stats([p], concl)[2] == 0 for p in prem): continue + key = (tuple(sorted(show(p) for p in prem)), show(concl)) + if key in seen: continue + seen.add(key); args.append((prem, concl, used, p_rows, cex)); break + recs, checks, valid_ids = [], [], [] + for i, (prem, concl, used, p_rows, cex) in enumerate(args): + aid = "ARG%02d" % (i + 1) + recs.append({"id": aid, "source": "Sheet %d, question %d" % (r.randint(1, 9), r.randint(1, 20)), + "premises": [out(p) for p in prem], "conclusion": out(concl)}) + base = "arguments.%s." % aid + checks += [c_bool(base + "valid", cex == 0), c_int(base + "premise_true_rows", p_rows), c_int(base + "counterexample_rows", cex)] + if cex == 0: + valid_ids.append(aid) + if d == 3: checks.append(c_set(base + "essential_premises", essential_premises(prem, concl), item="int")) + else: + checks.append(c_custom("counterexample", {"id": aid, "premises": recs[-1]["premises"], "conclusion": recs[-1]["conclusion"]})) + checks.append(c_set("valid_ids", valid_ids, weight=2)) + extra = "" + if d == 3: + extra = "\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none." + inst = """# Argument check: validity + +`arguments.json` holds %d arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply. + +Test every argument with a full truth table over the atoms that occur in it. + +Write `answer.json` in this folder, a JSON object with: + +- `arguments`: an object keyed by argument id. For each argument give + - `valid`: `true` or `false`. + - `premise_true_rows`: the number of rows in which every premise is true, as an integer. + - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument). + - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.%s +- `valid_ids`: list of the ids of the valid arguments (any order). +""" % (n, extra) + return Task(ENV, "validity", seed, d, "Validity of %d arguments" % n, inst, + {"arguments.json": to_json(recs), "logic_reference.md": REFERENCE}, checks, {"arguments": n, "valid": len(valid_ids)}) + +# ---------------------------------------------------------------- consistency +def gen_consistency(seed, d): + r = rng_for(ENV + "/consistency", seed, d) + n = {1: 4, 2: 6, 3: 7}[d] + lo, hi = {1: (2, 3), 2: (3, 4), 3: (4, 6)}[d] + out = printer(r, d) + n_sat = n // 2 + (1 if n % 2 and r.random() < 0.5 else 0) + kinds = ["sat"] * n_sat + ["unsat"] * (n - n_sat) + r.shuffle(kinds) + letters = sorted(r.sample(POOL, hi)) + sets, seen = [], set() + for kind in kinds: + while True: + atoms = sorted(r.sample(letters, r.randint(lo, hi))) + k = len(atoms) + r.choice([0, 1]) if d < 3 else min(6, len(atoms) + r.choice([-1, 0])) + sents = [rand_formula(r, atoms, 1 if d == 1 else r.choice([1, 1, 2])) for _ in range(k)] + if len(set(sents)) < k or not all(contingent(s) for s in sents): continue + st = set_stats(sents) + if len(st["atoms"]) != len(atoms): continue + if kind == "sat" and not (1 <= st["models"] <= (2 if len(atoms) <= 3 else 3)): continue + if kind == "unsat" and st["models"] != 0: continue + key = tuple(sorted(show(s) for s in sents)) + if key in seen: continue + seen.add(key); sets.append((sents, st)); break + recs, checks, unsat_ids = [], [], [] + for i, (sents, st) in enumerate(sets): + sid = "SET%02d" % (i + 1) + recs.append({"id": sid, "source": "Sheet %d, question %d" % (r.randint(1, 9), r.randint(1, 20)), "sentences": [out(s) for s in sents]}) + base = "sets.%s." % sid + checks += [c_bool(base + "satisfiable", st["models"] > 0), c_int(base + "models", st["models"]), c_int(base + "most_true_together", st["most"])] + if st["models"]: + checks.append(c_custom("satisfying_valuation", {"id": sid, "sentences": recs[-1]["sentences"]})) + if d >= 2: checks += [c_set(base + "forced_true", st["forced_true"]), c_set(base + "forced_false", st["forced_false"])] + else: + unsat_ids.append(sid) + if d == 3: checks.append(c_set(base + "restoring", st["restoring"], item="int")) + checks.append(c_set("unsatisfiable_ids", unsat_ids, weight=2)) + extra = "" + if d >= 2: + extra += "\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none)." + if d == 3: + extra += "\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none." + inst = """# Argument check: consistency + +`sentence_sets.json` holds %d sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply. + +Test every set with a full truth table over the atoms that occur in it. + +Write `answer.json` in this folder, a JSON object with: + +- `sets`: an object keyed by set id. For each set give + - `satisfiable`: `true` or `false`. + - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable). + - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences). + - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.%s +- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order). +""" % (n, extra) + return Task(ENV, "consistency", seed, d, "Consistency of %d sets of sentences" % n, inst, + {"sentence_sets.json": to_json(recs), "logic_reference.md": REFERENCE}, checks, {"sets": n, "unsatisfiable": len(unsat_ids)}) + +# ---------------------------------------------------------------- equivalence +def rewrites(f, good): + """Results of rewriting the top connective of f by a sound law (good) or by a classic slip (not good). + The caller always confirms the outcome with a truth table, so a 'slip' that happens to be sound is harmless.""" + if isinstance(f, str): return [] + op, res = f[0], [] + if op == "~": + x = f[1] + if isinstance(x, str): return [] + if x[0] == "~": return [x[1]] if good else [] # double negation + a, b = x[1], x[2] + if x[0] == "&": res.append(("|", neg(a), neg(b)) if good else ("&", neg(a), neg(b))) + if x[0] == "|": res.append(("&", neg(a), neg(b)) if good else ("|", neg(a), neg(b))) + if x[0] == "->": res += [("&", a, neg(b))] if good else [("&", neg(a), b), ("->", neg(a), neg(b))] + if x[0] == "<->": res.append(("<->", a, neg(b)) if good else ("<->", neg(a), neg(b))) + return res + a, b = f[1], f[2] + if op == "&": + if good: + res += [("~", ("|", neg(a), neg(b))), ("~", ("->", a, neg(b)))] + if not isinstance(b, str) and b[0] == "|": res.append(("|", ("&", a, b[1]), ("&", a, b[2]))) + else: + res.append(("~", ("|", neg(a), b))) + if not isinstance(b, str) and b[0] == "|": res.append(("|", ("&", a, b[1]), b[2])) + if op == "|": + if good: + res += [("~", ("&", neg(a), neg(b))), ("->", neg(a), b)] + if not isinstance(b, str) and b[0] == "&": res.append(("&", ("|", a, b[1]), ("|", a, b[2]))) + else: + res += [("->", a, b), ("~", ("&", neg(a), b))] + if not isinstance(b, str) and b[0] == "&": res.append(("&", ("|", a, b[1]), b[2])) + if op == "->": + if good: + res += [("|", neg(a), b), ("->", neg(b), neg(a)), ("~", ("&", a, neg(b)))] + if not isinstance(a, str) and a[0] == "&": res.append(("->", a[1], ("->", a[2], b))) + if not isinstance(a, str) and a[0] == "|": res.append(("&", ("->", a[1], b), ("->", a[2], b))) + else: + res += [("->", b, a), ("->", neg(a), neg(b)), ("|", a, neg(b)), ("~", ("&", neg(a), b))] + if not isinstance(a, str) and a[0] == "&": res.append(("&", ("->", a[1], b), ("->", a[2], b))) + if not isinstance(a, str) and a[0] == "|": res.append(("|", ("->", a[1], b), ("->", a[2], b))) + if op == "<->": + if good: res += [("&", ("->", a, b), ("->", b, a)), ("|", ("&", a, b), ("&", neg(a), neg(b))), ("<->", neg(a), neg(b))] + else: res += [("->", a, b), ("|", ("&", a, b), ("&", neg(a), b)), ("<->", neg(a), b), ("&", ("->", a, b), ("->", neg(b), a))] + return res + +def paths(f, here=()): + if isinstance(f, str): return [here] + out = [here] + for i, x in enumerate(f[1:]): out += paths(x, here + (i + 1,)) + return out + +def get_at(f, p): + for i in p: f = f[i] + return f + +def put_at(f, p, new): + if not p: return new + parts = list(f); parts[p[0]] = put_at(f[p[0]], p[1:], new) + return tuple(parts) + +def rewrite_somewhere(r, f, good): + spots = [(p, alt) for p in paths(f) for alt in rewrites(get_at(f, p), good)] + if not spots: return None + p, alt = r.choice(spots) + return put_at(f, p, alt) + +def gen_equivalence(seed, d): + r = rng_for(ENV + "/equivalence", seed, d) + n = {1: 5, 2: 6, 3: 6}[d] + lo, hi = {1: (2, 3), 2: (3, 4), 3: (4, 6)}[d] + out = printer(r, d) + n_eq = n // 2 + (1 if n % 2 and r.random() < 0.5 else 0) + kinds = ["eq"] * n_eq + ["diff"] * (n - n_eq) + r.shuffle(kinds) + letters = sorted(r.sample(POOL, hi)) + pairs, seen = [], set() + for kind in kinds: + while True: + atoms = sorted(r.sample(letters, r.randint(lo, hi))) + left = rand_formula(r, atoms, 2 if d == 1 else r.choice([2, 3])) + if len(atoms_of([left])) != len(atoms) or not contingent(left): continue + right = left + steps = [kind == "eq"] if d == 1 else [kind == "eq", True] if r.random() < 0.6 else [kind == "eq"] + r.shuffle(steps) + for good in steps: + right = rewrite_somewhere(r, right, good) if right is not None else None + if right is None or right == left or depth(right) > 5 or len(show(right)) > 64 or len(show(left)) > 48: continue + st = pair_stats(left, right) + if (st["relation"] == "equivalent") != (kind == "eq"): continue + if r.random() < 0.5: left, right = right, left; st = pair_stats(left, right) + key = (show(left), show(right)) + if key in seen: continue + seen.add(key); pairs.append((left, right, st)); break + recs, checks, eq_ids = [], [], [] + for i, (left, right, st) in enumerate(pairs): + pid = "PAIR%02d" % (i + 1) + recs.append({"id": pid, "left": out(left), "right": out(right)}) + base = "pairs.%s." % pid + checks += [c_bool(base + "equivalent", st["relation"] == "equivalent"), c_int(base + "left_models", st["left_models"]), c_int(base + "right_models", st["right_models"])] + if d == 3: checks += [c_int(base + "left_only_rows", st["left_only"]), c_str(base + "relation", st["relation"])] + if st["relation"] == "equivalent": eq_ids.append(pid) + else: checks.append(c_custom("distinguishing_valuation", {"id": pid, "left": recs[-1]["left"], "right": recs[-1]["right"]})) + checks.append(c_set("equivalent_ids", eq_ids, weight=2)) + files = {"pairs.json": to_json(recs), "logic_reference.md": REFERENCE} + extra, more, intro = "", "", "" + if d == 3: + extra = """ + - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer. + - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.""" + if d >= 2: + forms = ["cnf"] if d == 2 else ["cnf", "dnf"] + conv = [] + while len(conv) < 2: + atoms = sorted(r.sample(letters, 3 if d == 2 else 4)) + f = rand_formula(r, atoms, r.choice([2, 3])) + st = set_stats([f]) + if len(st["atoms"]) != len(atoms) or not (2 <= st["models"] <= 2 ** len(atoms) - 2): continue + if is_normal_form(f, "cnf") or is_normal_form(f, "dnf") or len(show(f)) > 48 or f in [c for c in conv]: continue + if not any(get_at(f, p)[0] in ("->", "<->") for p in paths(f) if not isinstance(get_at(f, p), str)): continue + conv.append(f) + crecs = [{"id": "F%02d" % (i + 1), "formula": out(f)} for i, f in enumerate(conv)] + files["convert.json"] = to_json(crecs) + for form in forms: + for c in crecs: checks.append(c_custom("normal_form", {"id": c["id"], "formula": c["formula"], "form": form}, weight=2)) + intro = " `convert.json` holds %d further formulas to rewrite in normal form." % len(crecs) + more = "\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted." + if d == 3: + more += "\n- `dnf`: the same for disjunctive normal form." + inst = """# Argument check: equivalence + +`pairs.json` holds %d pairs of formulas in propositional logic, `left` and `right`.%s `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply. + +Compare the two formulas of every pair with a full truth table over the atoms that occur in either of them. + +Write `answer.json` in this folder, a JSON object with: + +- `pairs`: an object keyed by pair id. For each pair give + - `equivalent`: `true` or `false`. + - `left_models`: the number of rows in which `left` is true, as an integer. + - `right_models`: the number of rows in which `right` is true, as an integer.%s + - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`. +- `equivalent_ids`: list of the ids of the equivalent pairs (any order).%s +""" % (n, intro, extra, more) + return Task(ENV, "equivalence", seed, d, "Equivalence of %d pairs of formulas" % n, inst, files, checks, {"pairs": n, "equivalent": len(eq_ids)}) + +FAMILIES = {"validity": gen_validity, "consistency": gen_consistency, "equivalence": gen_equivalence} + +def generate(seed, difficulty, family=None): + fam = family or sorted(FAMILIES)[seed % len(FAMILIES)] + return FAMILIES[fam](seed, difficulty) diff --git a/envs/argument_check/oracle.py b/envs/argument_check/oracle.py new file mode 100644 index 0000000000000000000000000000000000000000..d3a559afcecc03a6e202b78b7d3818db23719046 --- /dev/null +++ b/envs/argument_check/oracle.py @@ -0,0 +1,144 @@ +#!/usr/bin/env python3 +"""Reference solution for Argument Check. Works only from the files in the current directory. + +Formulas are read with a shunting-yard pass into reverse Polish notation and evaluated on a stack, +following the precedence and grouping rules of logic_reference.md. +""" +import json, os + +BINDING = {"~": 5, "&": 4, "|": 3, "->": 2, "<->": 1} +GROUPS_RIGHT = {"~", "->", "<->"} + +def lex(text): + toks, i = [], 0 + while i < len(text): + c = text[i] + if c.isspace(): i += 1; continue + if text[i:i + 3] == "<->": toks.append("<->"); i += 3; continue + if text[i:i + 2] == "->": toks.append("->"); i += 2; continue + if c in "~&|()" or (len(c) == 1 and "A" <= c <= "Z"): toks.append(c); i += 1; continue + raise ValueError("cannot read %r" % text) + return toks + +def to_rpn(text): + out, ops = [], [] + expect_operand = True + for t in lex(text): + if t not in BINDING and t not in "()": # an atom + if not expect_operand: raise ValueError(text) + out.append(t); expect_operand = False + elif t == "~": + if not expect_operand: raise ValueError(text) + ops.append(t) + elif t == "(": + if not expect_operand: raise ValueError(text) + ops.append(t) + elif t == ")": + if expect_operand: raise ValueError(text) + while ops and ops[-1] != "(": out.append(ops.pop()) + if not ops: raise ValueError(text) + ops.pop() + else: # a two-place connective + if expect_operand: raise ValueError(text) + while ops and ops[-1] != "(" and (BINDING[ops[-1]] > BINDING[t] or (BINDING[ops[-1]] == BINDING[t] and t not in GROUPS_RIGHT)): + out.append(ops.pop()) + ops.append(t); expect_operand = True + if expect_operand: raise ValueError(text) + while ops: + if ops[-1] == "(": raise ValueError(text) + out.append(ops.pop()) + return out + +def run(rpn, val): + st = [] + for t in rpn: + if t == "~": st.append(not st.pop()) + elif t in BINDING: + y = st.pop(); x = st.pop() + st.append((x and y) if t == "&" else (x or y) if t == "|" else ((not x) or y) if t == "->" else (x == y)) + else: st.append(val[t]) + assert len(st) == 1 + return st[0] + +def letters(rpns): + return sorted(set(t for rpn in rpns for t in rpn if t not in BINDING)) + +def all_rows(atoms): + rows = [] + for k in range(2 ** len(atoms)): + rows.append(dict((a, bool((k >> i) & 1)) for i, a in enumerate(atoms))) + return rows + +def load(name): + with open(name) as f: return json.load(f) + +def validity(): + ans = {"arguments": {}, "valid_ids": []} + for arg in load("arguments.json"): + prem = [to_rpn(p) for p in arg["premises"]]; concl = to_rpn(arg["conclusion"]) + rows = all_rows(letters(prem + [concl])) + def bad_rows(ps): + return [v for v in rows if all(run(p, v) for p in ps) and not run(concl, v)] + p_true = sum(1 for v in rows if all(run(p, v) for p in prem)) + cex = bad_rows(prem) + rec = {"valid": not cex, "premise_true_rows": p_true, "counterexample_rows": len(cex), "counterexample": cex[0] if cex else None} + if not cex: + rec["essential_premises"] = [i + 1 for i in range(len(prem)) if bad_rows(prem[:i] + prem[i + 1:])] + ans["valid_ids"].append(arg["id"]) + ans["arguments"][arg["id"]] = rec + return ans + +def consistency(): + ans = {"sets": {}, "unsatisfiable_ids": []} + for s in load("sentence_sets.json"): + sents = [to_rpn(x) for x in s["sentences"]] + atoms = letters(sents); rows = all_rows(atoms) + truth = [[run(x, v) for x in sents] for v in rows] + models = [v for v, t in zip(rows, truth) if all(t)] + rec = {"satisfiable": bool(models), "models": len(models), "most_true_together": max(sum(t) for t in truth), + "valuation": models[0] if models else None} + if models: + rec["forced_true"] = [a for a in atoms if all(m[a] for m in models)] + rec["forced_false"] = [a for a in atoms if not any(m[a] for m in models)] + else: + rec["restoring"] = [i + 1 for i in range(len(sents)) if any(all(t[:i] + t[i + 1:]) for t in truth)] + ans["unsatisfiable_ids"].append(s["id"]) + ans["sets"][s["id"]] = rec + return ans + +def lit(atom, positive): + return atom if positive else "~" + atom + +def equivalence(): + ans = {"pairs": {}, "equivalent_ids": []} + for p in load("pairs.json"): + left, right = to_rpn(p["left"]), to_rpn(p["right"]) + rows = all_rows(letters([left, right])) + l_only = [v for v in rows if run(left, v) and not run(right, v)] + r_only = [v for v in rows if run(right, v) and not run(left, v)] + same = not l_only and not r_only + ans["pairs"][p["id"]] = { + "equivalent": same, "left_models": sum(1 for v in rows if run(left, v)), "right_models": sum(1 for v in rows if run(right, v)), + "left_only_rows": len(l_only), + "relation": "equivalent" if same else "left-entails-right" if not l_only else "right-entails-left" if not r_only else "neither", + "distinguishing": None if same else (l_only + r_only)[0]} + if same: ans["equivalent_ids"].append(p["id"]) + if os.path.exists("convert.json"): + ans["cnf"], ans["dnf"] = {}, {} + for c in load("convert.json"): + f = to_rpn(c["formula"]); atoms = letters([f]); rows = all_rows(atoms) + # one clause per false row (the clause is false in exactly that row); one term per true row + clauses = ["(" + " | ".join(lit(a, not v[a]) for a in atoms) + ")" for v in rows if not run(f, v)] + terms = ["(" + " & ".join(lit(a, v[a]) for a in atoms) + ")" for v in rows if run(f, v)] + ans["cnf"][c["id"]] = " & ".join(clauses) + ans["dnf"][c["id"]] = " | ".join(terms) + return ans + +def main(): + if os.path.exists("arguments.json"): answer = validity() + elif os.path.exists("sentence_sets.json"): answer = consistency() + else: answer = equivalence() + with open("answer.json", "w") as f: json.dump(answer, f, indent=1) + +if __name__ == "__main__": + main() diff --git a/envs/argument_check/validators.py b/envs/argument_check/validators.py new file mode 100644 index 0000000000000000000000000000000000000000..8d161e2765656acf1754813ff29079a40fe8a858 --- /dev/null +++ b/envs/argument_check/validators.py @@ -0,0 +1,152 @@ +"""Custom checks for Argument Check. Standalone, standard library only. + +Every function reads the candidate from the answer, evaluates the formulas of the problem itself +(the formulas arrive in `args` as text) and returns True only if the candidate really has the +property asked for. Nothing is compared with a stored solution. Malformed answers return False. +""" + +_LEVEL = {"<->": 1, "->": 2, "|": 3, "&": 4} +_MAX_LEN = 2000 + +class _Bad(Exception): + pass + +def _scan(text): + if not isinstance(text, str): raise _Bad() + toks, i, n = [], 0, len(text) + while i < n: + c = text[i] + if c == " " or c == "\t": i += 1 + elif c == "<" and text[i:i + 3] == "<->": toks.append("<->"); i += 3 + elif c == "-" and text[i:i + 2] == "->": toks.append("->"); i += 2 + elif c in ("~", "&", "|", "(", ")"): toks.append(c); i += 1 + elif c in "ABCDEFGHIJKLMNOPQRSTUVWXYZ": toks.append(c); i += 1 + else: raise _Bad() + return toks + +def _read(text): + """Precedence climbing. Tree nodes: ("atom", A), ("not", x), ("bin", op, x, y).""" + toks = _scan(text) + state = {"i": 0} + def primary(): + i = state["i"] + if i >= len(toks): raise _Bad() + t = toks[i]; state["i"] = i + 1 + if t == "~": return ("not", primary()) + if t == "(": + x = climb(1) + if state["i"] >= len(toks) or toks[state["i"]] != ")": raise _Bad() + state["i"] += 1 + return x + if len(t) == 1 and t.isalpha(): return ("atom", t) + raise _Bad() + def climb(min_level): + left = primary() + while state["i"] < len(toks): + op = toks[state["i"]] + lv = _LEVEL.get(op) + if lv is None or lv < min_level: break + state["i"] += 1 + # & and | group to the left, so the right operand must bind tighter; -> and <-> group to the right + right = climb(lv if op in ("->", "<->") else lv + 1) + left = ("bin", op, left, right) + return left + tree = climb(1) + if state["i"] != len(toks): raise _Bad() + return tree + +def _value(t, v): + kind = t[0] + if kind == "atom": return v[t[1]] + if kind == "not": return not _value(t[1], v) + op, x, y = t[1], _value(t[2], v), _value(t[3], v) + if op == "&": return x and y + if op == "|": return x or y + if op == "->": return y or not x + return x is y + +def _atoms(trees): + found, stack = set(), list(trees) + while stack: + t = stack.pop() + if t[0] == "atom": found.add(t[1]) + elif t[0] == "not": stack.append(t[1]) + else: stack.append(t[2]); stack.append(t[3]) + return found + +def _valuation(obj, atoms): + """The candidate must be an object with exactly the atoms that occur as keys and booleans as values.""" + if not isinstance(obj, dict) or set(obj.keys()) != set(atoms): return None + for k in obj: + if obj[k] is not True and obj[k] is not False: return None + return obj + +def _dig(answer, keys): + cur = answer + for k in keys: + if not isinstance(cur, dict) or k not in cur: return None + cur = cur[k] + return cur + +def counterexample(answer, args): + """answer.arguments..counterexample makes every premise true and the conclusion false.""" + try: + prem = [_read(p) for p in args["premises"]]; concl = _read(args["conclusion"]) + v = _valuation(_dig(answer, ["arguments", args["id"], "counterexample"]), _atoms(prem + [concl])) + if v is None: return False + return all(_value(p, v) for p in prem) and not _value(concl, v) + except Exception: + return False + +def satisfying_valuation(answer, args): + """answer.sets..valuation makes every sentence of the set true.""" + try: + sents = [_read(s) for s in args["sentences"]] + v = _valuation(_dig(answer, ["sets", args["id"], "valuation"]), _atoms(sents)) + if v is None: return False + return all(_value(s, v) for s in sents) + except Exception: + return False + +def distinguishing_valuation(answer, args): + """answer.pairs..distinguishing gives the two formulas different truth values.""" + try: + left, right = _read(args["left"]), _read(args["right"]) + v = _valuation(_dig(answer, ["pairs", args["id"], "distinguishing"]), _atoms([left, right])) + if v is None: return False + return _value(left, v) is not _value(right, v) + except Exception: + return False + +def _flatten(t, op): + parts, stack = [], [t] + while stack: + x = stack.pop() + if x[0] == "bin" and x[1] == op: stack.append(x[3]); stack.append(x[2]) + else: parts.append(x) + return parts + +def _is_literal(t): + return t[0] == "atom" or (t[0] == "not" and t[1][0] == "atom") + +def normal_form(answer, args): + """answer.
. is a formula in the normal form asked for (args.form is "cnf" or "dnf"), equivalent to + args.formula, built only from atoms of args.formula, and at most 2000 characters long.""" + try: + form = args["form"] + if form not in ("cnf", "dnf"): return False + text = _dig(answer, [form, args["id"]]) + if not isinstance(text, str) or len(text) > _MAX_LEN: return False + orig = _read(args["formula"]); cand = _read(text) + atoms = sorted(_atoms([orig])) + if not _atoms([cand]) <= set(atoms): return False + outer, inner = ("&", "|") if form == "cnf" else ("|", "&") + for part in _flatten(cand, outer): + for leaf in _flatten(part, inner): + if not _is_literal(leaf): return False + for k in range(2 ** len(atoms)): + v = dict((a, bool((k >> i) & 1)) for i, a in enumerate(atoms)) + if _value(orig, v) is not _value(cand, v): return False + return True + except Exception: + return False diff --git a/envs/class_test/__init__.py b/envs/class_test/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/envs/class_test/env.toml b/envs/class_test/env.toml new file mode 100644 index 0000000000000000000000000000000000000000..8dc6a85117176671e653476c1ec81f6c0e1f2ec3 --- /dev/null +++ b/envs/class_test/env.toml @@ -0,0 +1,7 @@ +name = "class-test" +title = "Class Test" +isced = "0111" +summary = "Analyse a class test as a teacher would: mark answer sheets, run item and distractor analysis, and standardise or moderate the marks." +task_type = "assessment analysis" +good_for = ["Classical test theory on small classes", "Applying a marking scheme exactly", "Counting and filtering tabular records"] +families = ["marking", "item-analysis", "distractors", "moderation"] diff --git a/envs/class_test/gen.py b/envs/class_test/gen.py new file mode 100644 index 0000000000000000000000000000000000000000..baa7dc8a0764a6bf3c48d963588137db5d5da613 --- /dev/null +++ b/envs/class_test/gen.py @@ -0,0 +1,571 @@ +"""Class Test (ISCED-F 0111 Education science: educational assessment). + +Four task families, all on synthetic classes (student ids only): + marking mark multiple-choice answer sheets against a key: per-item marks, negative marking, + withdrawn items, percentages and grades from grade boundaries + item-analysis item facility, upper-lower discrimination index (27% groups), KR-20, point-biserial + distractors option counts per item, non-functioning distractors, items where a distractor beats the key + moderation rescale marks to a target mean and SD, per teaching group, and adjust markers after + a moderation sample + +Methods and sources + Facility (p value) = proportion correct. Discrimination index D = (U - L) / n with upper and lower + groups of 27% of the class: Kelley, T. L. (1939). The selection of upper and lower groups for the + validation of test items. J. Educ. Psychol. 30, 17-24. + KR-20 = k/(k-1) * (1 - sum(p*q) / variance of totals), population variance: Kuder, G. F. & + Richardson, M. W. (1937). The theory of the estimation of test reliability. Psychometrika 2, 151-160. + Point-biserial r = (M1 - M0) / s * sqrt(p*q), s the population SD of the totals (equal to the Pearson + correlation between the 0/1 item score and the total). + A distractor chosen by under 5% of candidates is non-functioning: Haladyna, T. M. & Downing, S. M. + (1993). How many options is enough for a multiple-choice test item? Educ. Psychol. Meas. 53, 999-1010. + Linear rescaling to a target mean and SD: scaled = target mean + (x - mean) / SD * target SD. + The flagging thresholds, grade boundaries and the marker-adjustment rule are stated in each task's + notes file; they are conventions chosen for these tasks. +""" +import math +from practice.core import Task, rng_for, to_csv, c_int, c_num, c_str, c_set, c_list, clear_of + +ENV = "class-test" + +def sid_list(r, n): return ["S%03d" % i for i in sorted(r.sample(range(1, 400), n))] + +# ---------------------------------------------------------------- marking +def mark_sheet(resp, key, marks, penalty=0.0): + """resp: one answer per item ('' = blank). key: the correct option per item, or 'VOID' for a withdrawn item. + penalty: fraction of the item's marks lost for a wrong answer. Returns the total, never below 0.""" + total = 0.0 + for a, k, m in zip(resp, key, marks): + if k == "VOID" or a == "": continue + total += m if a == k else -penalty * m + return max(0.0, total) + +def max_marks(key, marks): return sum(m for k, m in zip(key, marks) if k != "VOID") + +def grade_for(percent, bounds): + """bounds: list of (grade, minimum percent), highest first. Below the last minimum the grade is U.""" + for g, lo in bounds: + if percent >= lo: return g + return "U" + +def marking_scheme(d, bounds, penalty): + L = ["# Marking scheme", "", "Each item has one correct option, given in `answer_key.csv` with the marks it carries.", "", + "- A correct answer earns the item's marks."] + if d == 1: + L += ["- A wrong answer or an unanswered item (empty cell) earns 0."] + else: + L += ["- A wrong answer loses %s of the item's marks (negative marking)." % {0.25: "one quarter", 0.5: "one half"}[penalty], + "- An unanswered item (empty cell) earns 0 and loses nothing.", + "- If a student's total comes out below 0, it is recorded as 0."] + if d >= 3: + L += ["- A cell with more than one letter (for example `BD`) means the student marked more than one option: treat it as a wrong answer.", + "- An item whose key is `VOID` has been withdrawn. It earns and loses nothing for anyone, and its marks are not part of the maximum."] + L += ["", "The maximum is the sum of the marks of all items%s. The percentage is the student's total divided by the maximum, times 100." % (" that have not been withdrawn" if d >= 3 else ""), + "", "## Grade boundaries", "", "The grade is decided on the exact percentage, before any rounding.", "", "| Grade | Percentage |", "|---|---|"] + for g, lo in bounds: L.append("| %s | %d or more |" % (g, lo)) + L.append("| U | under %d |" % bounds[-1][1]) + return "\n".join(L) + "\n" + +def gen_marking(seed, d): + r = rng_for(ENV + "/marking", seed, d) + k, n = {1: (20, 6), 2: (24, 9), 3: (30, 10)}[d] + penalty = 0.0 if d == 1 else r.choice([0.25, 0.5]) + key = [r.choice("ABCD") for _ in range(k)] + marks = [1] * k if d == 1 else [r.choice([1, 1, 2, 2, 3]) for _ in range(k)] + if d >= 3: + for j in r.sample(range(k), r.randint(1, 2)): key[j] = "VOID" + bounds = [("A", r.choice([75, 80])), ("B", r.choice([60, 65])), ("C", r.choice([50, 55])), ("D", r.choice([35, 40, 45]))] + top = max_marks(key, marks) + sids = sid_list(r, n) + sheets, res = {}, {} + for i, s in enumerate(sids): + while True: + p = r.choice([0.3, 0.45, 0.55, 0.65, 0.75, 0.85, 0.93]) if i else 0.15 # the first student mostly guesses + resp = [] + for j in range(k): + right = key[j] if key[j] != "VOID" else r.choice("ABCD") + u = r.random() + if u < p: a = right + elif u < p + (1 - p) * (0.15 if d == 1 else 0.3): a = "" + else: a = r.choice([x for x in "ABCD" if x != right]) + if d >= 3 and a and r.random() < 0.04: a = "".join(sorted(set([a, r.choice("ABCD")]) | set(r.choice("ABCD")))) + resp.append(a) + total = mark_sheet(resp, key, marks, penalty) + pct = 100.0 * total / top + if clear_of(pct, [b for _, b in bounds], 0.5): break + sheets[s] = resp; res[s] = (total, pct, grade_for(pct, bounds)) + order = sids[:]; r.shuffle(order) + rows = [] + for s in order: + row = {"student_id": s, "form": r.choice(["9A", "9B"])} + for j in range(k): row["Q%d" % (j + 1)] = sheets[s][j] + rows.append(row) + krows = [{"item": "Q%d" % (j + 1), "key": key[j], "marks": marks[j]} for j in range(k)] + checks = [c_int("max_marks", top)] + for s in sids: + total, pct, g = res[s] + checks.append(c_int("students.%s.marks" % s, total) if d == 1 else c_num("students.%s.marks" % s, total, 2)) + checks += [c_num("students.%s.percent" % s, pct, 1), c_str("students.%s.grade" % s, g)] + checks.append(c_set("grade_u", [s for s in sids if res[s][2] == "U"], weight=2)) + lines = ["- `max_marks`: the maximum total, an integer.", + "- `students`: an object keyed by student id. Each value has", + " - `marks`: the student's total, %s." % ("an integer" if d == 1 else "2 decimals"), + " - `percent`: the percentage, 1 decimal.", + " - `grade`: one of `A`, `B`, `C`, `D`, `U`.", + "- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none)."] + if d >= 3: + for g in "ABCDU": checks.append(c_int("grade_counts.%s" % g, sum(1 for s in sids if res[s][2] == g))) + checks.append(c_num("mean_percent", sum(res[s][1] for s in sids) / n, 1)) + lines += ["- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).", + "- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal."] + inst = """# Class test: marking + +`answer_sheets.csv` holds the answer sheets of %d students for a %d-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly. + +Write `answer.json` in this folder, a JSON object with: + +%s + +Numbers are accepted within one unit of the last decimal place asked for. +""" % (n, k, "\n".join(lines)) + files = {"answer_sheets.csv": to_csv(rows, ["student_id", "form"] + ["Q%d" % (j + 1) for j in range(k)]), + "answer_key.csv": to_csv(krows, ["item", "key", "marks"]), "marking_scheme.md": marking_scheme(d, bounds, penalty)} + return Task(ENV, "marking", seed, d, "Mark a %d-item test for %d students" % (k, n), inst, files, checks, {"students": n, "items": k}) + +# ---------------------------------------------------------------- item analysis +def facility(matrix, j): + return sum(row[j] for row in matrix) / float(len(matrix)) + +def group_size(n): + """27% of the class, rounded to the nearest whole number (half up).""" + return int(math.floor(0.27 * n + 0.5)) + +def ranked(ids, matrix): + """Indices of the students, highest total first; equal totals in ascending order of student id.""" + return sorted(range(len(ids)), key=lambda i: (-sum(matrix[i]), ids[i])) + +def discrimination(ids, matrix, j): + g = group_size(len(ids)); order = ranked(ids, matrix) + up = sum(matrix[i][j] for i in order[:g]); low = sum(matrix[i][j] for i in order[-g:]) + return (up - low) / float(g) + +def var_p(xs): + """Population variance (N in the denominator).""" + m = sum(xs) / float(len(xs)) + return sum((x - m) ** 2 for x in xs) / float(len(xs)) + +def kr20(matrix): + k = len(matrix[0]) + pq = sum(facility(matrix, j) * (1 - facility(matrix, j)) for j in range(k)) + return k / (k - 1.0) * (1.0 - pq / var_p([sum(row) for row in matrix])) + +def point_biserial(matrix, j): + tot = [sum(row) for row in matrix] + one = [t for t, row in zip(tot, matrix) if row[j] == 1]; zero = [t for t, row in zip(tot, matrix) if row[j] == 0] + p = len(one) / float(len(matrix)) + return (sum(one) / float(len(one)) - sum(zero) / float(len(zero))) / math.sqrt(var_p(tot)) * math.sqrt(p * (1 - p)) + +def item_notes(d): + t = """# Item analysis: definitions + +A student's item score is 1 if the answer is correct and 0 otherwise%s. A student's total is the sum of the item scores. `N` is the number of students%s. + +## Facility + +The facility of an item is the proportion of the `N` students who got it right. + +## Discrimination index + +1. Put the students in order of total, highest first. Students with the same total are ordered by student id, ascending (`S012` before `S105`). +2. The group size `n_group` is 27%% of `N`, rounded to the nearest whole number (round half up). +3. The upper group is the first `n_group` students in that order and the lower group is the last `n_group` students. +4. Discrimination = (number in the upper group who got the item right - number in the lower group who got it right) / `n_group`. + +An item has poor discrimination if its discrimination index is below 0.20. +""" % ("" if d == 1 else " (an empty cell is an unanswered item and counts as wrong)", "" if d < 3 else " who sat the test. Rows with status `absent` are not part of the analysis") + if d >= 2: + t += """ +## Easy and hard items + +An item is too easy if its facility is above 0.85 and too hard if its facility is below 0.30. + +## KR-20 reliability + +With `k` items, facility `p_j` for item `j`, and `var` the variance of the students' totals computed with `N` in the denominator (population variance): + + KR-20 = k / (k - 1) * (1 - sum over items of p_j * (1 - p_j) / var) + +(the sum is taken first, then divided by `var`). +""" + if d >= 3: + t += """ +## Point-biserial correlation + +For an item with facility `p`, let `M1` be the mean total of the students who got it right, `M0` the mean total of the students who got it wrong, and `s` the standard deviation of all `N` totals (square root of the population variance above). The total includes the item itself. + + r_pb = (M1 - M0) / s * sqrt(p * (1 - p)) + +An item needs review if its point-biserial is below 0.20. +""" + return t + +def gen_items(seed, d): + r = rng_for(ENV + "/item-analysis", seed, d) + k = {1: 8, 2: 10, 3: 10}[d] + while True: + n = r.randint(18, 26) if d == 1 else r.randint(30, 45) + if abs((0.27 * n) % 1 - 0.5) > 0.1: break + ids = sid_list(r, n) + while True: + b = [r.uniform(-1.2, 1.2) for _ in range(k)]; a = [r.uniform(0.8, 2.0) for _ in range(k)] + special = r.sample(range(k), 3) + b[special[0]] = -2.6 # an easy item + if d >= 2: b[special[1]] = 2.2 # a hard item + a[special[2]] = r.choice([0.0, 0.1, -0.5]) # an item that does not discriminate + matrix = [] + for _ in ids: + th = r.gauss(0, 1) + matrix.append([1 if r.random() < 1.0 / (1.0 + math.exp(-a[j] * (th - b[j]))) else 0 for j in range(k)]) + fac = [facility(matrix, j) for j in range(k)] + if not all(0 < f < 1 and clear_of(f, [0.30, 0.85], 0.012) for f in fac): continue + dis = [discrimination(ids, matrix, j) for j in range(k)] + if not all(clear_of(x, [0.20], 0.02) for x in dis): continue + if var_p([sum(row) for row in matrix]) < 1.0: continue + pb = [point_biserial(matrix, j) for j in range(k)] + if d >= 3 and not all(clear_of(x, [0.20], 0.02) for x in pb): continue + if not any(x < 0.20 for x in dis): continue + break + items = ["Q%d" % (j + 1) for j in range(k)] + files = {"item_analysis_notes.md": item_notes(d)} + if d == 1: + rows = [dict([("student_id", s)] + list(zip(items, matrix[i]))) for i, s in enumerate(ids)] + r.shuffle(rows) + files["scores.csv"] = to_csv(rows, ["student_id"] + items) + else: + key = [r.choice("ABCD") for _ in range(k)] + rows = [] + for i, s in enumerate(ids): + row = {"student_id": s, "class": r.choice(["8X", "8Y"]), "status": "present"} + for j in range(k): + row[items[j]] = key[j] if matrix[i][j] else ("" if r.random() < 0.08 else r.choice([x for x in "ABCD" if x != key[j]])) + rows.append(row) + if d >= 3: + for s in ["S%03d" % x for x in r.sample(range(400, 500), r.randint(2, 4))]: + row = {"student_id": s, "class": r.choice(["8X", "8Y"]), "status": "absent"} + for q in items: row[q] = "" + rows.append(row) + r.shuffle(rows) + files["responses.csv"] = to_csv(rows, ["student_id", "class"] + (["status"] if d >= 3 else []) + items) + files["key.csv"] = to_csv([{"item": q, "key": key[j]} for j, q in enumerate(items)], ["item", "key"]) + checks = [c_int("n_group", group_size(n))] + for j, q in enumerate(items): + checks += [c_num("items.%s.facility" % q, fac[j], 3), c_num("items.%s.discrimination" % q, dis[j], 3)] + if d >= 3: checks.append(c_num("items.%s.point_biserial" % q, pb[j], 3)) + checks.append(c_set("poor_discrimination", [q for j, q in enumerate(items) if dis[j] < 0.20], weight=2)) + lines = ["- `n_group`: the size of the upper group (and of the lower group), an integer.", + "- `items`: an object keyed by item (`Q1` to `Q%d`). Each value has" % k, + " - `facility`: 3 decimals.", " - `discrimination`: the discrimination index, 3 decimals."] + if d >= 3: lines.append(" - `point_biserial`: 3 decimals.") + lines.append("- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).") + if d >= 2: + checks += [c_set("too_easy", [q for j, q in enumerate(items) if fac[j] > 0.85], weight=2), + c_set("too_hard", [q for j, q in enumerate(items) if fac[j] < 0.30], weight=2), c_num("kr20", kr20(matrix), 3, weight=2)] + lines += ["- `too_easy`: list of the items that are too easy (any order; an empty list if none).", + "- `too_hard`: list of the items that are too hard (any order; an empty list if none).", + "- `kr20`: the KR-20 reliability of the test, 3 decimals."] + if d >= 3: + checks += [c_int("n_students", n), c_set("needs_review", [q for j, q in enumerate(items) if pb[j] < 0.20], weight=2)] + lines += ["- `n_students`: the number of students in the analysis, an integer.", + "- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none)."] + src = "`scores.csv` holds the item scores (1 right, 0 wrong) of %d students on a %d-item test" % (n, k) if d == 1 else \ + "`responses.csv` holds the options chosen by the students of two classes on a %d-item multiple-choice test, and `key.csv` the correct options" % k + inst = """# Class test: item analysis + +%s. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.%s + +Write `answer.json` in this folder, a JSON object with: + +%s + +Numbers are accepted within one unit of the last decimal place asked for. +""" % (src, " Analyse the two classes together as one group." if d >= 2 else "", "\n".join(lines)) + return Task(ENV, "item-analysis", seed, d, "Item analysis of a %d-item test" % k, inst, files, checks, {"students": n, "items": k}) + +# ---------------------------------------------------------------- distractors +def option_counts(responses, options): + """responses: one string per student ('' = omitted). Returns the count for each option, in order.""" + return [sum(1 for a in responses if a == o) for o in options] + +def non_functioning(counts, options, key, n): + """Distractors chosen by under 5% of the n students.""" + return [o for o, c in zip(options, counts) if o != key and 20 * c < n] + +def beaten(counts, options, key): + kc = counts[options.index(key)] + return any(c > kc for o, c in zip(options, counts) if o != key) + +def distractor_notes(d): + t = """# Distractor analysis: definitions + +For each item, the key is the correct option and the other options are its distractors. `N` is the number of students who sat the test%s. + +- The count of an option is the number of students who chose it. +- A distractor is non-functioning if it was chosen by under 5%% of the `N` students (count divided by `N` below 0.05). +- A distractor beats the key if it was chosen by more students than the key was. +""" % (" (an empty cell means the student left the item out; such students still count in `N`)" if d >= 2 else "") + if d >= 3: + t += "- Rows with status `absent` did not sit the test: they are not part of `N` or of any count.\n- Some items have five options (A to E); `key.csv` gives the number of options of each item.\n" + return t + +def gen_distractors(seed, d): + r = rng_for(ENV + "/distractors", seed, d) + k = {1: 6, 2: 8, 3: 7}[d] + while True: + n = r.randint(32, 58) if d == 1 else r.randint(45, 95) + if n % 20: break + items = ["Q%d" % (j + 1) for j in range(k)] + while True: + spec, cols, ok = [], [], True + for j in range(k): + opts = "ABCDE" if (d >= 3 and r.random() < 0.4) else "ABCD" + key = r.choice(opts) + dist = [o for o in opts if o != key]; r.shuffle(dist) + kind = r.choice(["normal", "normal", "dead", "dead", "beaten", "two-dead"]) + w = {key: r.uniform(0.5, 0.75)} + rest = [r.uniform(0.5, 1.5) for _ in dist] + if kind in ("dead", "two-dead"): rest[0] = r.choice([0.0, 0.03, 0.06]) + if kind == "two-dead": rest[1] = r.choice([0.0, 0.04]) + if kind == "beaten": w[key] = r.uniform(0.2, 0.3); rest[0] = 3.5 + for o, x in zip(dist, rest): w[o] = (1 - w[key]) * x / sum(rest) + omit = 0.0 if d == 1 else r.choice([0.0, 0.03, 0.08]) + col = [] + for _ in range(n): + u = r.random() + if u < omit: col.append(""); continue + u = r.random(); acc = 0.0; pick = opts[-1] + for o in opts: + acc += w[o] + if u < acc: pick = o; break + col.append(pick) + cnt = option_counts(col, opts) + dc = sorted([c for o, c in zip(opts, cnt) if o != key], reverse=True) + if dc[0] == cnt[opts.index(key)] or (d >= 3 and dc[0] == dc[1]): ok = False + spec.append((opts, key)); cols.append(col) + if not ok: continue + nf = [non_functioning(option_counts(cols[j], spec[j][0]), spec[j][0], spec[j][1], n) for j in range(k)] + bt = [beaten(option_counts(cols[j], spec[j][0]), spec[j][0], spec[j][1]) for j in range(k)] + if 1 <= sum(1 for x in nf if x) < k and 1 <= sum(bt) < k and (d == 1 or any("" in c for c in cols)): break + ids = sid_list(r, n) + rows = [] + for i, s in enumerate(ids): + row = {"student_id": s, "class": r.choice(["10P", "10Q", "10R"]), "status": "present"} + for j, q in enumerate(items): row[q] = cols[j][i] + rows.append(row) + if d >= 3: + for s in ["S%03d" % x for x in r.sample(range(400, 500), r.randint(2, 5))]: + row = {"student_id": s, "class": r.choice(["10P", "10Q", "10R"]), "status": "absent"} + for q in items: row[q] = "" + rows.append(row) + r.shuffle(rows) + krows = [{"item": q, "key": spec[j][1], "n_options": len(spec[j][0])} for j, q in enumerate(items)] + checks = [] + for j, q in enumerate(items): + opts, key = spec[j]; cnt = option_counts(cols[j], opts) + checks += [c_list("items.%s.counts" % q, cnt, item="int"), c_set("items.%s.non_functioning" % q, nf[j])] + if d >= 2: + checks += [c_int("items.%s.omitted" % q, cols[j].count("")), c_num("items.%s.key_pct" % q, 100.0 * cnt[opts.index(key)] / n, 1)] + if d >= 3: + best = max((c, o) for o, c in zip(opts, cnt) if o != key)[1] + checks.append(c_str("items.%s.top_distractor" % q, best)) + checks += [c_set("has_non_functioning", [q for j, q in enumerate(items) if nf[j]], weight=2), + c_set("key_beaten", [q for j, q in enumerate(items) if bt[j]], weight=2)] + lines = ["- `items`: an object keyed by item (`Q1` to `Q%d`). Each value has" % k, + " - `counts`: a list of integers, the count of each option in the order A, B, C, D%s." % (" (and E for a five-option item)" if d >= 3 else ""), + " - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none)."] + if d >= 2: + lines += [" - `omitted`: the number of students who left the item out, an integer.", + " - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal."] + if d >= 3: lines.append(" - `top_distractor`: the letter of the distractor chosen by the most students.") + lines += ["- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).", + "- `key_beaten`: list of the items where at least one distractor beats the key (any order)."] + if d >= 3: + checks.append(c_int("n_students", n)); lines.append("- `n_students`: `N`, an integer.") + inst = """# Class test: distractor analysis + +`responses.csv` holds the option each student chose on each of the %d items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together. + +Write `answer.json` in this folder, a JSON object with: + +%s + +Numbers are accepted within one unit of the last decimal place asked for. +""" % (k, "\n".join(lines)) + files = {"responses.csv": to_csv(rows, ["student_id", "class"] + (["status"] if d >= 3 else []) + items), + "key.csv": to_csv(krows, ["item", "key"] + (["n_options"] if d >= 3 else [])), "distractor_notes.md": distractor_notes(d)} + return Task(ENV, "distractors", seed, d, "Distractor analysis of a %d-item test" % k, inst, files, checks, {"students": n, "items": k}) + +# ---------------------------------------------------------------- moderation +def pmean(xs): return sum(xs) / float(len(xs)) +def psd(xs): return math.sqrt(var_p(xs)) + +def rescale(x, mean, sd, target_mean, target_sd, top=None): + """Linear rescaling; if `top` is given the result is limited to the range 0 to top.""" + y = target_mean + (x - mean) / sd * target_sd + if top is not None: y = min(float(top), max(0.0, y)) + return y + +def marker_adjustment(pairs, tolerance): + """pairs: (marker's mark, moderator's mark) for the sampled scripts of one marker. + Returns (mean difference moderator - marker, amount added to all that marker's marks).""" + diff = pmean([m - x for x, m in pairs]) + return diff, (diff if abs(diff) > tolerance else 0.0) + +def moderation_notes(d, top, tm, ts, tol): + t = """# Standardising marks + +The test is marked out of %d. + +## Rescaling to a target mean and standard deviation + +The target mean is %d and the target standard deviation is %d. For a set of marks with mean `M` and standard deviation `SD`, a mark `x` becomes + + scaled = %d + (x - M) / SD * %d + +`SD` is the population standard deviation: the square root of the mean squared deviation from `M`, with the number of marks in the denominator (not one less). +""" % (top, tm, ts, tm, ts) + if d == 2: + t += """ +Each teaching group is rescaled separately, with its own `M` and `SD`. A student with no mark was absent and is left out of everything. + +A scaled mark above %d is set to %d, and a scaled mark below 0 is set to 0. +""" % (top, top) + if d >= 3: + t += """ +## Step 1: moderation of markers + +A moderator has re-marked a sample of each marker's scripts (`moderation_sample.csv`). For each marker: + +1. For each sampled script of that marker, take the moderator's mark minus the marker's mark. +2. The marker's mean difference is the mean of these differences. +3. If the mean difference is more than %.1f marks in either direction (above %.1f or below -%.1f), add the unrounded mean difference to **every** mark given by that marker, sampled or not. Otherwise leave that marker's marks as they are. + +Do not limit or round the marks at this step. The moderator's own marks are used only to work out the mean difference. + +## Step 2: rescaling + +Take the marks of all students after step 1 as one set (all markers together), and rescale them to the target mean and standard deviation with the formula above. A scaled mark above %d is set to %d, and a scaled mark below 0 is set to 0. +""" % (tol, tol, tol, top, top) + return t + +def gen_moderation(seed, d): + r = rng_for(ENV + "/moderation", seed, d) + top = r.choice([50, 60, 80, 100]) + tm, ts = int(round(top * r.choice([0.62, 0.65]))), int(round(top * r.choice([0.17, 0.19]))) + tol = r.choice([1.5, 2.0, 2.5]) + files, checks, lines = {}, [], [] + + def cluster(n, outlier): + c = r.uniform(0.3, 0.5) * top; s = r.uniform(0.06, 0.1) * top + xs = [int(min(top, max(0, round(r.gauss(c, s))))) for _ in range(n)] + if outlier: xs[0] = int(min(top, round(c + 5.5 * s))) + return xs + + def clamp_ok(v): return clear_of(v, [0, top], 0.3) + + if d == 1: + n = 10; ids = sid_list(r, n) + while True: + xs = cluster(n, False) + if psd(xs) > 0.05 * top and all(0 < rescale(x, pmean(xs), psd(xs), tm, ts) < top for x in xs): break + rows = [{"student_id": s, "seat": r.randint(1, 30), "mark": x} for s, x in zip(ids, xs)] + r.shuffle(rows) + files["marks.csv"] = to_csv(rows, ["student_id", "seat", "mark"]) + checks += [c_num("raw_mean", pmean(xs), 2), c_num("raw_sd", psd(xs), 2)] + checks += [c_num("students.%s.scaled" % s, rescale(x, pmean(xs), psd(xs), tm, ts), 1) for s, x in zip(ids, xs)] + lines = ["- `raw_mean`: the mean of the marks, 2 decimals.", "- `raw_sd`: the population standard deviation of the marks, 2 decimals.", + "- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal."] + what = "`marks.csv` holds the marks of %d students on a class test." % n + elif d == 2: + groups = r.sample(["7A", "7B", "7C", "7D"], 2); ids = sid_list(r, 18); r.shuffle(ids) + member = dict((g, sorted(ids[i * 8:(i + 1) * 8])) for i, g in enumerate(groups)); absent = sorted(ids[16:]) + while True: + marks, scaled, clamped, ok = {}, {}, [], True + for gi, g in enumerate(groups): + xs = cluster(8, gi == 0 or r.random() < 0.3) + order = member[g][:]; r.shuffle(order) + for s, x in zip(order, xs): + raw = rescale(x, pmean(xs), psd(xs), tm, ts) + marks[s] = x; scaled[s] = rescale(x, pmean(xs), psd(xs), tm, ts, top) + if not clamp_ok(raw): ok = False + if raw != scaled[s]: clamped.append(s) + if psd(xs) < 0.04 * top: ok = False + if ok and clamped: break + rows = [{"student_id": s, "group": g, "mark": marks[s]} for g in groups for s in member[g]] + rows += [{"student_id": s, "group": r.choice(groups), "mark": ""} for s in absent] + r.shuffle(rows) + files["marks.csv"] = to_csv(rows, ["student_id", "group", "mark"]) + for g in sorted(groups): + xs = [marks[s] for s in member[g]] + checks += [c_num("groups.%s.raw_mean" % g, pmean(xs), 2), c_num("groups.%s.raw_sd" % g, psd(xs), 2)] + checks += [c_num("students.%s.scaled" % s, scaled[s], 1) for s in sorted(marks)] + checks += [c_set("clamped", clamped, weight=2), c_set("absent", absent, weight=2)] + lines = ["- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.", + "- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.", + "- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).", + "- `absent`: list of the student ids with no mark (any order)."] + what = "`marks.csv` holds the marks of two teaching groups on the same test." + else: + markers = ["M1", "M2", "M3"]; ids = sid_list(r, 21); r.shuffle(ids) + scripts = dict((m, sorted(ids[i * 7:(i + 1) * 7])) for i, m in enumerate(markers)) + while True: + bias = dict((m, r.choice([-0.09, -0.06, 0.0, 0.0, 0.05, 0.08]) * top) for m in markers) + marks, sample, diffs, add = {}, {}, {}, {} + for mi, m in enumerate(markers): + xs = cluster(7, mi == 0) + order = scripts[m][:]; r.shuffle(order) + for s, x in zip(order, xs): marks[s] = x + chosen = r.sample(scripts[m], r.randint(3, 4)) + for s in chosen: sample[s] = int(min(top, max(0, round(marks[s] + bias[m] + r.gauss(0, 0.02 * top))))) + diffs[m], add[m] = marker_adjustment([(marks[s], sample[s]) for s in chosen], tol) + if not all(clear_of(abs(diffs[m]), [tol], 0.3) for m in markers): continue + if not 1 <= sum(1 for m in markers if add[m]) <= 2: continue + adj = dict((s, marks[s] + add[m]) for m in markers for s in scripts[m]) + vals = [adj[s] for s in sorted(adj)]; M, SD = pmean(vals), psd(vals) + raw = dict((s, rescale(adj[s], M, SD, tm, ts)) for s in adj) + if not all(clamp_ok(v) for v in raw.values()): continue + final = dict((s, rescale(adj[s], M, SD, tm, ts, top)) for s in adj) + clamped = [s for s in adj if final[s] != raw[s]] + if clamped or r.random() < 0.3: break + rows = [{"student_id": s, "marker": m, "mark": marks[s]} for m in markers for s in scripts[m]] + r.shuffle(rows) + srows = [{"student_id": s, "moderator_mark": v} for s, v in sample.items()] + r.shuffle(srows) + files["scripts.csv"] = to_csv(rows, ["student_id", "marker", "mark"]) + files["moderation_sample.csv"] = to_csv(srows, ["student_id", "moderator_mark"]) + checks += [c_num("markers.%s.mean_difference" % m, diffs[m], 2) for m in markers] + checks += [c_set("adjusted_markers", [m for m in markers if add[m]], weight=2), c_num("cohort_mean", M, 2), c_num("cohort_sd", SD, 2)] + checks += [c_num("students.%s.final" % s, final[s], 1) for s in sorted(final)] + checks.append(c_set("clamped", clamped, weight=2)) + lines = ["- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.", + "- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).", + "- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.", + "- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.", + "- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none)."] + what = "`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts." + inst = """# Class test: standardising marks + +%s `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly. + +Write `answer.json` in this folder, a JSON object with: + +%s + +Numbers are accepted within one unit of the last decimal place asked for. +""" % (what, "\n".join(lines)) + files["moderation_notes.md"] = moderation_notes(d, top, tm, ts, tol) + return Task(ENV, "moderation", seed, d, "Standardise the marks of a class test", inst, files, checks, {"max_mark": top}) + +FAMILIES = {"marking": gen_marking, "item-analysis": gen_items, "distractors": gen_distractors, "moderation": gen_moderation} + +def generate(seed, difficulty, family=None): + fam = family or sorted(FAMILIES)[seed % len(FAMILIES)] + return FAMILIES[fam](seed, difficulty) diff --git a/envs/class_test/oracle.py b/envs/class_test/oracle.py new file mode 100644 index 0000000000000000000000000000000000000000..e043ed0b60f023c40b06c9442e39c79083b55968 --- /dev/null +++ b/envs/class_test/oracle.py @@ -0,0 +1,162 @@ +#!/usr/bin/env python3 +"""Reference solution for Class Test. Works only from the files in the current directory.""" +import csv, json, math, os, re +from decimal import Decimal, ROUND_HALF_UP +from fractions import Fraction + +def rows(name): + with open(name, newline="") as f: return list(csv.DictReader(f)) + +def text(name): + with open(name) as f: return f.read() + +def item_cols(row): + return sorted([c for c in row if re.match(r"^Q\d+$", c)], key=lambda c: int(c[1:])) + +# ---------------------------------------------------------------- marking +def marking(): + scheme = text("marking_scheme.md") + penalty = Fraction(0) + if "one quarter" in scheme: penalty = Fraction(1, 4) + elif "one half" in scheme: penalty = Fraction(1, 2) + bounds = [(g, int(lo)) for g, lo in re.findall(r"^\| ([A-D]) \| (\d+) or more \|", scheme, re.M)] + bounds.sort(key=lambda b: -b[1]) + key = dict((r["item"], (r["key"].strip(), int(r["marks"]))) for r in rows("answer_key.csv")) + live = [q for q in key if key[q][0] != "VOID"] + top = sum(key[q][1] for q in live) + ans = {"max_marks": top, "students": {}, "grade_u": [], "grade_counts": dict((g, 0) for g in "ABCDU")} + pcts = [] + for r in rows("answer_sheets.csv"): + total = Fraction(0) + for q in live: + a = r[q].strip() + if a == "": continue + if a == key[q][0]: total += key[q][1] + else: total -= penalty * key[q][1] + if total < 0: total = Fraction(0) + pct = total * 100 / top + grade = "U" + for g, lo in bounds: + if pct >= lo: + grade = g; break + ans["students"][r["student_id"]] = {"marks": float(total), "percent": round(float(pct), 1), "grade": grade} + ans["grade_counts"][grade] += 1 + if grade == "U": ans["grade_u"].append(r["student_id"]) + pcts.append(pct) + ans["mean_percent"] = round(float(sum(pcts) / len(pcts)), 1) + return ans + +# ---------------------------------------------------------------- item analysis +def item_analysis(): + if os.path.exists("scores.csv"): + data = rows("scores.csv"); items = item_cols(data[0]) + score = dict((r["student_id"], [int(r[q]) for q in items]) for r in data) + else: + key = dict((r["item"], r["key"].strip()) for r in rows("key.csv")) + data = [r for r in rows("responses.csv") if r.get("status", "present") != "absent"] + items = item_cols(data[0]) + score = dict((r["student_id"], [1 if r[q].strip() == key[q] else 0 for q in items]) for r in data) + n, k = len(score), len(items) + total = dict((s, sum(v)) for s, v in score.items()) + order = sorted(score, key=lambda s: s) + order.sort(key=lambda s: total[s], reverse=True) # stable: equal totals stay in id order + g = int((Decimal(27) * n / Decimal(100)).quantize(Decimal(1), rounding=ROUND_HALF_UP)) + upper, lower = order[:g], order[n - g:] + mean_t = sum(total.values()) / n + var_t = sum((t - mean_t) ** 2 for t in total.values()) / n + ans = {"n_group": g, "n_students": n, "items": {}, "poor_discrimination": [], "too_easy": [], "too_hard": [], "needs_review": []} + sum_pq = 0.0 + for j, q in enumerate(items): + right = [s for s in score if score[s][j] == 1]; wrong = [s for s in score if score[s][j] == 0] + p = len(right) / n + disc = (sum(score[s][j] for s in upper) - sum(score[s][j] for s in lower)) / g + m1 = sum(total[s] for s in right) / len(right); m0 = sum(total[s] for s in wrong) / len(wrong) + rpb = (m1 - m0) / math.sqrt(var_t) * math.sqrt(p * (1 - p)) + sum_pq += p * (1 - p) + ans["items"][q] = {"facility": round(p, 3), "discrimination": round(disc, 3), "point_biserial": round(rpb, 3)} + if disc < 0.20: ans["poor_discrimination"].append(q) + if p > 0.85: ans["too_easy"].append(q) + if p < 0.30: ans["too_hard"].append(q) + if rpb < 0.20: ans["needs_review"].append(q) + ans["kr20"] = round(k / (k - 1) * (1 - sum_pq / var_t), 3) + return ans + +# ---------------------------------------------------------------- distractors +def distractors(): + keys = rows("key.csv") + data = [r for r in rows("responses.csv") if r.get("status", "present") != "absent"] + n = len(data) + ans = {"items": {}, "has_non_functioning": [], "key_beaten": [], "n_students": n} + for kr in keys: + q, key = kr["item"], kr["key"].strip() + opts = "ABCDE"[:int(kr.get("n_options") or 4)] + tally = dict((o, 0) for o in opts); omitted = 0 + for r in data: + a = r[q].strip() + if a == "": omitted += 1 + else: tally[a] += 1 + dead = [o for o in opts if o != key and Fraction(tally[o], n) < Fraction(5, 100)] + others = sorted([o for o in opts if o != key], key=lambda o: -tally[o]) + ans["items"][q] = {"counts": [tally[o] for o in opts], "non_functioning": dead, "omitted": omitted, + "key_pct": round(100.0 * tally[key] / n, 1), "top_distractor": others[0]} + if dead: ans["has_non_functioning"].append(q) + if tally[others[0]] > tally[key]: ans["key_beaten"].append(q) + return ans + +# ---------------------------------------------------------------- moderation +def stats(xs): + m = sum(xs) / len(xs) + return m, math.sqrt(sum((x - m) ** 2 for x in xs) / len(xs)) + +def moderation(): + notes = text("moderation_notes.md") + top = float(re.search(r"marked out of (\d+)", notes).group(1)) + tm = float(re.search(r"target mean is (\d+)", notes).group(1)) + ts = float(re.search(r"target standard deviation is (\d+)", notes).group(1)) + def limit(v): return min(top, max(0.0, v)) + if os.path.exists("scripts.csv"): + tol = float(re.search(r"more than ([\d.]+) marks", notes).group(1)) + scripts = rows("scripts.csv") + mark = dict((r["student_id"], float(r["mark"])) for r in scripts) + marker = dict((r["student_id"], r["marker"]) for r in scripts) + diffs = {} + for r in rows("moderation_sample.csv"): + diffs.setdefault(marker[r["student_id"]], []).append(float(r["moderator_mark"]) - mark[r["student_id"]]) + ans = {"markers": {}, "adjusted_markers": [], "students": {}, "clamped": []} + shift = {} + for m in sorted(set(marker.values())): + md = sum(diffs[m]) / len(diffs[m]) + ans["markers"][m] = {"mean_difference": round(md, 2)} + shift[m] = md if (md > tol or md < -tol) else 0.0 + if shift[m]: ans["adjusted_markers"].append(m) + adj = dict((s, mark[s] + shift[marker[s]]) for s in mark) + M, SD = stats(list(adj.values())) + ans["cohort_mean"], ans["cohort_sd"] = round(M, 2), round(SD, 2) + for s, x in adj.items(): + v = tm + (x - M) / SD * ts + ans["students"][s] = {"final": round(limit(v), 1)} + if v > top or v < 0: ans["clamped"].append(s) + return ans + data = rows("marks.csv") + if "group" not in data[0]: + xs = [float(r["mark"]) for r in data] + M, SD = stats(xs) + return {"raw_mean": round(M, 2), "raw_sd": round(SD, 2), + "students": dict((r["student_id"], {"scaled": round(tm + (float(r["mark"]) - M) / SD * ts, 1)}) for r in data)} + ans = {"groups": {}, "students": {}, "clamped": [], "absent": [r["student_id"] for r in data if r["mark"].strip() == ""]} + present = [r for r in data if r["mark"].strip() != ""] + for g in sorted(set(r["group"] for r in present)): + mine = [r for r in present if r["group"] == g] + M, SD = stats([float(r["mark"]) for r in mine]) + ans["groups"][g] = {"raw_mean": round(M, 2), "raw_sd": round(SD, 2)} + for r in mine: + v = tm + (float(r["mark"]) - M) / SD * ts + ans["students"][r["student_id"]] = {"scaled": round(limit(v), 1)} + if v > top or v < 0: ans["clamped"].append(r["student_id"]) + return ans + +if os.path.exists("answer_sheets.csv"): answer = marking() +elif os.path.exists("item_analysis_notes.md"): answer = item_analysis() +elif os.path.exists("distractor_notes.md"): answer = distractors() +else: answer = moderation() +with open("answer.json", "w") as f: json.dump(answer, f, indent=1) diff --git a/envs/emissions_inventory/__init__.py b/envs/emissions_inventory/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/envs/emissions_inventory/env.toml b/envs/emissions_inventory/env.toml new file mode 100644 index 0000000000000000000000000000000000000000..2a29db7b92aa51e631e5637a95d1832112751877 --- /dev/null +++ b/envs/emissions_inventory/env.toml @@ -0,0 +1,7 @@ +name = "emissions-inventory" +title = "Emissions Inventory" +isced = "0521" +summary = "Compile a greenhouse-gas inventory from activity records: unit conversion, emission factors, scopes, CO2e from several gases, trends and data cleaning." +task_type = "emissions accounting" +good_for = ["Unit conversion and table lookup before aggregation", "Using supplied factors rather than remembered ones", "Cleaning duplicated and missing records by a stated rule"] +families = ["activity-data", "multi-gas", "time-series", "data-quality"] diff --git a/envs/emissions_inventory/gen.py b/envs/emissions_inventory/gen.py new file mode 100644 index 0000000000000000000000000000000000000000..521c97edf7578ce993010e00f4c5e16fda5f6dd2 --- /dev/null +++ b/envs/emissions_inventory/gen.py @@ -0,0 +1,444 @@ +"""Emissions Inventory (ISCED-F 0521 Environmental sciences). + +Four task families, all for synthetic organisations: + activity-data activity data in mixed units times emission factors, by source, by scope and in total + multi-gas CO2, CH4 and N2O per source converted to CO2e with a supplied GWP table; refrigerant leaks + time-series year-on-year change, change against a base year, intensity, and the cut needed to hit a target + data-quality meter readings with duplicated rows, missing months and mixed units, cleaned by stated rules + +Methods: emissions = activity data x emission factor, and CO2e = sum of gas mass x GWP, as in the GHG Protocol +Corporate Accounting and Reporting Standard (WRI/WBCSD, revised edition 2004) and the 2006 IPCC Guidelines for +National Greenhouse Gas Inventories. Scopes 1, 2 and 3, biogenic CO2 reported outside the scopes, and base-year +recalculation after a divestment also follow the GHG Protocol Corporate Standard. +The 100-year GWP values shipped in tasks are those of the IPCC Fourth Assessment Report (2007: CH4 25, N2O 298, +HFC-134a 1430, HFC-32 675, SF6 22800) or Fifth Assessment Report (2013: CH4 28, N2O 265, HFC-134a 1300, +HFC-32 677, SF6 23500); each task ships the table it wants used. Emission factors are synthetic, of realistic +size, and are always shipped with the task. +""" +from practice.core import Task, rng_for, to_csv, c_int, c_num, c_str, c_set, c_bool + +ENV = "emissions-inventory" +ORGS = ["Brantholm Municipality", "Kestrel Joinery", "Vessby Dairy Cooperative", "Harlow Fold Logistics", "Tarnwick Borough Council", "Lindqvist Castings", "Ostervik Bakery Group", "Marrow Vale Housing"] + +def md_table(header, rows): + out = ["| " + " | ".join(header) + " |", "|" + "|".join(["---"] * len(header)) + "|"] + for row in rows: out.append("| " + " | ".join(str(x) for x in row) + " |") + return "\n".join(out) + +def sig3(x): return float("%.3g" % x) + +# ---------------------------------------------------------------- formulas +def emission_t(quantity, to_factor_unit, factor_kg_per_unit): + """Tonnes CO2e for a quantity in its recorded unit: convert to the factor's unit, multiply, kg to tonnes.""" + return quantity * to_factor_unit * factor_kg_per_unit / 1000.0 + +def gas_masses(amount, co2_kg_per_unit, ch4_g_per_unit, n2o_g_per_unit): + """(tonnes CO2, kg CH4, kg N2O) for an amount in the factor's unit.""" + return amount * co2_kg_per_unit / 1000.0, amount * ch4_g_per_unit / 1000.0, amount * n2o_g_per_unit / 1000.0 + +def co2e_t(co2_t, ch4_kg, n2o_kg, gwp_ch4, gwp_n2o): + return co2_t + ch4_kg * gwp_ch4 / 1000.0 + n2o_kg * gwp_n2o / 1000.0 + +def percent_change(new, old): + return (new - old) / float(old) * 100.0 + +def intensity_kg_per_unit(total_t, output): + return total_t * 1000.0 / output + +def target_level(base_total, cut_percent): + return base_total * (1 - cut_percent / 100.0) + +def linear_annual_cut(latest, target, years_left): + return (latest - target) / float(years_left) + +def compound_annual_cut_percent(latest, target, years_left): + return (1 - (target / float(latest)) ** (1.0 / years_left)) * 100.0 + +def linear_path(base_total, target, base_year, target_year, year): + return base_total - (base_total - target) * (year - base_year) / float(target_year - base_year) + +def fill_gap(before, after): + return (before + after) / 2.0 + +# ---------------------------------------------------------------- activity data +SRC = [("diesel_fleet", "litre", 2.66, "1", ["litre", "litre", "m3"], (3000, 40000)), + ("petrol_fleet", "litre", 2.31, "1", ["litre"], (1500, 20000)), + ("natural_gas", "kWh", 0.183, "1", ["kWh", "MWh", "m3"], (60000, 600000)), + ("heating_oil", "litre", 2.54, "1", ["litre", "m3"], (3000, 30000)), + ("company_cars", "km", 0.171, "1", ["km", "mile"], (20000, 300000)), + ("purchased_electricity", "kWh", 0.233, "2", ["kWh", "MWh"], (80000, 900000)), + ("district_heating", "kWh", 0.098, "2", ["kWh", "MWh", "GJ"], (50000, 500000)), + ("business_flights", "km", 0.158, "3", ["km", "mile"], (20000, 400000)), + ("rail_travel", "km", 0.035, "3", ["km"], (10000, 200000)), + ("waste_to_landfill", "tonne", 446.0, "3", ["tonne", "kg"], (5, 120))] +OUTSIDE = [("wood_pellets", "tonne", 1650.0, "outside scopes", ["tonne", "kg"], (10, 150)), + ("biodiesel_b100", "litre", 2.49, "outside scopes", ["litre", "m3"], (2000, 20000))] +LIQUID = "diesel_fleet;petrol_fleet;heating_oil;biodiesel_b100" +DECIMALS = {"kWh": 0, "MWh": 3, "GJ": 1, "litre": 1, "m3": 3, "km": 0, "mile": 0, "tonne": 2, "kg": 0} +SITES = ["head_office", "depot", "workshop", "warehouse"] + +def gen_activity(seed, d): + r = rng_for(ENV + "/activity-data", seed, d) + org, year = r.choice(ORGS), r.randint(2019, 2024) + gas_cv = round(r.uniform(10.3, 11.2), 2) + conv = [("MWh", "kWh", 1000, "all"), ("GJ", "kWh", 277.78, "all"), ("m3", "kWh", gas_cv, "natural_gas"), ("m3", "litre", 1000, LIQUID), + ("mile", "km", 1.609344, "all"), ("kg", "tonne", 0.001, "all"), ("therm", "kWh", 29.3071, "all"), ("gallon_uk", "litre", 4.54609, LIQUID)] + def mult(source, unit, funit): + if unit == funit: return 1.0 + for a, b, m, who in conv: + if a == unit and b == funit and (who == "all" or source in who.split(";")): return float(m) + while True: + table = [(s, u, sig3(f * r.uniform(0.9, 1.1)), sc, units, rng) for s, u, f, sc, units, rng in SRC + (OUTSIDE if d == 3 else [])] + by_scope_src = dict((sc, [t for t in table if t[3] == sc]) for sc in ("1", "2", "3", "outside scopes")) + used = [r.choice(by_scope_src[sc]) for sc in ("1", "2", "3")] + rest = [t for t in table if t not in used and t[3] != "outside scopes"] + used += r.sample(rest, {1: 2, 2: 4, 3: 5}[d]) + if d == 3: used += r.sample(by_scope_src["outside scopes"], r.randint(1, 2)) + sites = SITES[:1] if d == 1 else sorted(r.sample(SITES, r.randint(2, 3))) + rows, by_source, by_scope, by_site = [], {}, {"1": 0.0, "2": 0.0, "3": 0.0, "outside scopes": 0.0}, dict((s, 0.0) for s in sites) + for s, funit, f, sc, units, (lo, hi) in used: + annual = r.uniform(lo, hi) + parts = [r.uniform(0.5, 1.5) for _ in range(r.randint(1, 3) if d == 1 else r.randint(2, 4))] + for w in parts: + unit = r.choice(units) if (d >= 2 or r.random() < 0.6) else funit + m = mult(s, unit, funit) + qty = round(annual * w / sum(parts) / m, DECIMALS[unit]) + if DECIMALS[unit] == 0: qty = int(qty) + site = r.choice(sites) + rows.append({"site": site, "invoice_date": "%d-%02d-%02d" % (year, r.randint(1, 12), r.randint(1, 28)), "source": s, "quantity": qty, "unit": unit}) + e = emission_t(qty, m, f) + by_source[s] = by_source.get(s, 0.0) + e; by_scope[sc] += e + if sc != "outside scopes": by_site[site] += e + if d >= 2: + for _ in range(r.randint(3, 5)): + s, funit, f, sc, units, (lo, hi) = r.choice(used) + unit = r.choice(units) + qty = round(r.uniform(lo, hi) / 4 / mult(s, unit, funit), DECIMALS[unit]) + other = r.choice(["%d-%02d-%02d" % (year - 1, r.choice([11, 12]), r.randint(1, 28)), "%d-%02d-%02d" % (year + 1, r.choice([1, 2]), r.randint(1, 28))]) + rows.append({"site": r.choice(sites), "invoice_date": other, "source": s, "quantity": int(qty) if DECIMALS[unit] == 0 else qty, "unit": unit}) + total = by_scope["1"] + by_scope["2"] + by_scope["3"] + rank = sorted(((v, s) for s, v in by_source.items() if s not in [o[0] for o in OUTSIDE]), reverse=True) + if min(by_site.values()) <= 0: continue + if d == 3 and rank[0][0] - rank[1][0] < 0.03 * rank[0][0]: continue + break + r.shuffle(rows) + for i, row in enumerate(rows): row["record_id"] = "R%03d" % (i + 1); row["supplier_ref"] = "INV-%05d" % r.randint(10000, 99999) + checks = [c_num("by_source.%s" % s, by_source[s], 2) for s in sorted(by_source)] + checks += [c_num("by_scope.scope_%s" % k, by_scope[k], 2) for k in "123"] + [c_num("total_t_co2e", total, 2, weight=2)] + only = "Every record belongs to the %d reporting year." % year + more = "" + if d >= 2: + only = "The inventory covers the calendar year %d only: leave out records whose `invoice_date` falls in another year." % year + checks += [c_num("by_site.%s" % s, by_site[s], 2) for s in sites] + more += "\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals." + if d == 3: + only += (" Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, " + "but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.") + checks += [c_num("outside_scopes_t_co2e", by_scope["outside scopes"], 2), c_str("largest_source", rank[0][1], weight=2)] + checks += [c_num("scope_share_percent.scope_%s" % k, by_scope[k] / total * 100, 1) for k in "123"] + more += ("\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals." + "\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal." + "\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.") + files = {"activity_data.csv": to_csv(rows, ["record_id", "site", "invoice_date", "source", "quantity", "unit", "supplier_ref"]), + "emission_factors.csv": to_csv([(t[0], t[2], t[1], t[3]) for t in sorted(table)], ["source", "factor_kg_co2e_per_unit", "unit", "scope"]), + "unit_conversions.csv": to_csv(conv, ["from_unit", "to_unit", "multiply_by", "applies_to"]), + "inventory_boundary.md": "# Inventory boundary\n\n- Organisation: %s\n- Reporting year: %d (calendar year, by invoice date)\n- Reported: scopes 1, 2 and 3 in tonnes CO2e\n" % (org, year)} + inst = """# Emissions inventory: activity data + +You are compiling the %d greenhouse-gas inventory for %s (a synthetic organisation). + +- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used. +- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification. +- `inventory_boundary.md`: the organisation and the reporting year. +- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values. + +%s + +For each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg). + +Write `answer.json` in this folder, a JSON object with: + +- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year. +- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals. +- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.%s + +Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for. +""" % (year, org, only, more) + return Task(ENV, "activity-data", seed, d, "Activity data to tonnes CO2e, %d records" % len(rows), inst, files, checks, {"records": len(rows)}) + +# ---------------------------------------------------------------- multi-gas +GWP = {"AR4": ("IPCC Fourth Assessment Report (2007)", {"CO2": 1, "CH4": 25, "N2O": 298, "HFC-134a": 1430, "HFC-32": 675, "SF6": 22800}), + "AR5": ("IPCC Fifth Assessment Report (2013)", {"CO2": 1, "CH4": 28, "N2O": 265, "HFC-134a": 1300, "HFC-32": 677, "SF6": 23500})} +CATS = [("diesel_combustion", "litre", 2.68, 0.11, 0.14, ("m3", 1000.0), (5000, 60000), "diesel for vehicles and plant"), + ("petrol_combustion", "litre", 2.30, 0.80, 0.25, None, (2000, 20000), "petrol for pool cars"), + ("heating_oil_boiler", "litre", 2.54, 0.35, 0.021, ("m3", 1000.0), (3000, 40000), "heating oil burned in boilers"), + ("natural_gas_boiler", "m3", 2.02, 0.19, 0.036, None, (20000, 200000), "natural gas burned in boilers"), + ("wood_chip_boiler", "tonne", 0.0, 310.0, 41.0, ("kg", 0.001), (50, 800), "wood chips burned (biogenic CO2 not counted)"), + ("landfilled_waste", "tonne", 0.0, 52000.0, 0.0, ("kg", 0.001), (200, 5000), "municipal waste sent to landfill"), + ("dairy_cattle", "head", 0.0, 128000.0, 950.0, None, (40, 600), "dairy cows kept over the year"), + ("nitrogen_fertiliser", "tonne", 0.0, 0.0, 15700.0, ("kg", 0.001), (5, 80), "nitrogen applied as mineral fertiliser"), + ("wastewater_treatment", "person", 0.0, 410.0, 62.0, None, (2000, 40000), "people connected to the treatment works")] + +def gen_multigas(seed, d): + r = rng_for(ENV + "/multi-gas", seed, d) + org, year = r.choice(ORGS), r.randint(2019, 2024) + label, gwp = GWP[r.choice(sorted(GWP))] + n = {1: 4, 2: 6, 3: 8}[d] + while True: + cats = [(c[0], c[1], sig3(c[2] * r.uniform(0.95, 1.05)), sig3(c[3] * r.uniform(0.8, 1.2)), sig3(c[4] * r.uniform(0.8, 1.2))) + c[5:] for c in CATS] + picks = [r.choice(cats[:4]), r.choice(cats[4:])] + [r.choice(cats) for _ in range(n - 2)] + r.shuffle(picks) + rows, res, tot = [], {}, [0.0, 0.0, 0.0] + for i, (cat, unit, f1, f2, f3, alt, (lo, hi), desc) in enumerate(picks): + sid = "E%02d" % (i + 1) + amount = r.uniform(lo, hi) + if alt and d >= 2 and r.random() < 0.5: + rec_unit, m = alt + amount = round(amount / m, 3 if rec_unit == "m3" else 0) + else: + rec_unit, m = unit, 1.0 + amount = round(amount, 1 if unit in ("litre", "tonne") else 0) + if amount == int(amount): amount = int(amount) + rows.append({"source_id": sid, "category": cat, "description": desc, "amount": amount, "unit": rec_unit}) + co2, ch4, n2o = gas_masses(amount * m, f1, f2, f3) + res[sid] = (co2, ch4, n2o, co2e_t(co2, ch4, n2o, gwp["CH4"], gwp["N2O"])) + tot[0] += co2; tot[1] += ch4 * gwp["CH4"] / 1000.0; tot[2] += n2o * gwp["N2O"] / 1000.0 + rank = sorted(((v[3], s) for s, v in res.items()), reverse=True) + if d < 3 or rank[0][0] - rank[1][0] >= 0.03 * rank[0][0]: break + checks = [] + for sid in sorted(res): + co2, ch4, n2o, e = res[sid] + checks += [c_num("sources.%s.co2_t" % sid, co2, 2), c_num("sources.%s.ch4_kg" % sid, ch4, 2), c_num("sources.%s.n2o_kg" % sid, n2o, 2), c_num("sources.%s.co2e_t" % sid, e, 2)] + files = {"sources.csv": to_csv(rows, ["source_id", "category", "description", "amount", "unit"]), + "gas_factors.csv": to_csv([c[:5] for c in cats], ["category", "unit", "co2_kg_per_unit", "ch4_g_per_unit", "n2o_g_per_unit"]), + "gwp_values.md": "# Global warming potentials\n\n100-year values from the %s. Use these values, not any others you may know.\n\n%s\n\nCO2e of a gas = mass of the gas x its GWP.\n" + % (label, md_table(["gas", "GWP"], [(g, gwp[g]) for g in ["CO2", "CH4", "N2O", "HFC-134a", "HFC-32", "SF6"]]))} + units = "Every amount is already in the unit of its category's factors." + if d >= 2: units = "Some amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg." + hfc, more, grand = 0.0, "", sum(v[3] for v in res.values()) + if d == 3: + fr = [] + for i in range(r.randint(3, 5)): + gas, top = r.choice(["HFC-134a", "HFC-32"]), round(r.uniform(0.2, 6.0), 1) + fr.append({"unit_id": "AC%02d" % (i + 1), "location": r.choice(SITES), "refrigerant": gas, "charge_kg": round(top * r.uniform(2, 8), 1), "topped_up_kg": top}) + hfc += top * gwp[gas] / 1000.0 + files["refrigerant_log.csv"] = to_csv(fr, ["unit_id", "location", "refrigerant", "charge_kg", "topped_up_kg"]) + units += (" `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, " + "and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.") + grand += hfc + checks += [c_num("refrigerants_t_co2e", hfc, 3), c_num("non_co2_share_percent", (grand - tot[0]) / grand * 100, 1), c_str("largest_source", rank[0][1], weight=2)] + more = ("\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals." + "\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal." + "\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.") + checks += [c_num("totals.co2_t", tot[0], 2), c_num("totals.ch4_t_co2e", tot[1], 2), c_num("totals.n2o_t_co2e", tot[2], 2), c_num("totals.co2e_t", grand, 2, weight=2)] + inst = """# Emissions inventory: three gases + +You are compiling the %d greenhouse-gas inventory for %s (a synthetic organisation), gas by gas. + +- `sources.csv`: the emission sources and their activity amounts. +- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams. +- `gwp_values.md`: the global warming potentials to use. + +%s + +Write `answer.json` in this folder, a JSON object with: + +- `sources`: an object keyed by `source_id`, each with + - `co2_t`: CO2 emitted, in tonnes, 2 decimals. + - `ch4_kg`: CH4 emitted, in kg, 2 decimals. + - `n2o_kg`: N2O emitted, in kg, 2 decimals. + - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals. +- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (%s), each 2 decimals.%s + +1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for. +""" % (year, org, units, "everything together, including the refrigerant leaks, as tonnes CO2e" if d == 3 else "everything together as tonnes CO2e", more) + return Task(ENV, "multi-gas", seed, d, "CO2, CH4 and N2O for %d sources" % n, inst, files, checks, {"sources": n}) + +# ---------------------------------------------------------------- time series +OUTPUTS = [("tonnes of product", 4000, 60000), ("m2 of heated floor area", 20000, 300000), ("residents", 8000, 120000), ("thousand parcels delivered", 500, 20000)] + +def gen_series(seed, d): + r = rng_for(ENV + "/time-series", seed, d) + org = r.choice(ORGS) + n_years = {1: 5, 2: 6, 3: 7}[d] + out_name, lo, hi = r.choice(OUTPUTS) + while True: + y0 = r.randint(2014, 2018) + years = list(range(y0, y0 + n_years)) + sites = ["all"] if d == 1 else sorted(r.sample(["Alder", "Birch", "Cedar", "Dunlin", "Elm"], r.randint(3, 4))) + sold = r.choice(sites) if d == 3 else None + level = dict(((s, k), r.uniform(300, 9000) / len(sites)) for s in sites for k in "123") + out_level = dict((s, r.uniform(lo, hi) / len(sites)) for s in sites) + ledger, outputs, totals, out_tot = [], [], {}, {} + for y in years: + totals[y], out_tot[y] = 0.0, 0 + for s in sites: + gone = s == sold and y >= sold_year(years) if sold else False + if gone: continue + for k in "123": + level[(s, k)] *= r.uniform(0.89, 1.06) + amount = round(level[(s, k)], 1) + unit = "kg" if (d >= 2 and r.random() < 0.3) else "t" + ledger.append({"year": y, "site": s, "scope": k, "amount": int(round(amount * 1000)) if unit == "kg" else amount, "unit": unit}) + if s != sold: totals[y] += amount + out_level[s] *= r.uniform(0.95, 1.07) + o = int(round(out_level[s])) + outputs.append({"year": y, "site": s, "output": o}) + if s != sold: out_tot[y] += o + base, latest = years[0], years[-1] + cut = r.choice([25, 30, 35, 40, 42, 45, 50]) + target_year = latest + r.randint(4, 9) + target = target_level(totals[base], cut) + path = linear_path(totals[base], target, base, target_year, latest) + if totals[latest] < target * 1.05 or abs(totals[latest] - path) < 0.015 * path: continue + break + checks = [] + for i, y in enumerate(years): + checks += [c_num("years.%d.total_t_co2e" % y, totals[y], 1), c_num("years.%d.intensity_kg_per_unit" % y, intensity_kg_per_unit(totals[y], out_tot[y]), 1)] + if i: checks += [c_num("years.%d.change_vs_previous_percent" % y, percent_change(totals[y], totals[years[i - 1]]), 1), + c_num("years.%d.change_vs_base_percent" % y, percent_change(totals[y], totals[base]), 1)] + left = target_year - latest + checks += [c_num("target_t_co2e", target, 1), c_num("required_annual_reduction_t", linear_annual_cut(totals[latest], target, left), 1)] + tfile = ("# Emissions target: %s\n\n- Base year: %d\n- Target year: %d\n- Target: total emissions (scopes 1 to 3) %d %% below the base-year total.\n- Output measure: %s.\n" + % (org, base, target_year, cut, out_name)) + more = "" + if d == 1: + rows = [{"year": y, "scope_1_t": None, "scope_2_t": None, "scope_3_t": None, "output": out_tot[y]} for y in years] + for row in rows: + for e in ledger: + if e["year"] == row["year"]: row["scope_%s_t" % e["scope"]] = e["amount"] + r.shuffle(rows) + files = {"annual_emissions.csv": to_csv(rows, ["year", "scope_1_t", "scope_2_t", "scope_3_t", "output"])} + data = "`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (%s). The rows are in no particular order." % out_name + else: + r.shuffle(ledger) + files = {"emissions_ledger.csv": to_csv(ledger, ["year", "site", "scope", "amount", "unit"])} + data = ("`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). " + "A year's total is the sum over all sites and scopes.") + if d == 2: + agg = [{"year": y, "output": out_tot[y]} for y in years]; r.shuffle(agg) + files["output.csv"] = to_csv(agg, ["year", "output"]) + data += " `output.csv` gives each year's output (%s)." % out_name + else: + r.shuffle(outputs) + files["output.csv"] = to_csv(outputs, ["year", "site", "output"]) + data += (" `output.csv` gives each site's output per year (%s); a year's output is the sum over sites. Site %s was sold in %d. Under the base-year recalculation policy " + "in `target.md`, leave site %s out of every year, in both emissions and output." % (out_name, sold, sold_year(years), sold)) + tfile += "- Divested site: %s (sold in %d)\n" % (sold, sold_year(years)) + tfile += ("- Base-year recalculation policy: when a site is sold, its emissions and output are removed from every year of the series, the base year included, " + "so that all years cover the same sites.\n") + checks += [c_num("linear_path_latest_t", path, 1), c_bool("on_track", totals[latest] <= path)] + more = ("\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in %d, tonnes CO2e, 1 decimal." + "\n- `on_track`: true if the %d total is at or below `linear_path_latest_t`, otherwise false." % (latest, latest)) + if d == 3: + checks.append(c_num("required_annual_reduction_percent", compound_annual_cut_percent(totals[latest], target, left), 2)) + more += ("\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the %d total to the target by the target year, 2 decimals: " + "(1 - (target / latest total)^(1 / years left)) x 100." % latest) + files["target.md"] = tfile + inst = """# Emissions inventory: trend and target + +%s `target.md` gives the base year and the reduction target of %s (a synthetic organisation). + +Write `answer.json` in this folder, a JSON object with: + +- `years`: an object keyed by year (as a string, for example "%d"), each with + - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal. + - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal. + - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for %d. + - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for %d. +- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal. +- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the %d total to the target by the target year: (latest total - target) / years left, 1 decimal.%s + +A percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for. +""" % (data, org, base, base, base, latest, more) + return Task(ENV, "time-series", seed, d, "Emissions trend over %d years" % n_years, inst, files, checks, {"years": n_years}) + +def sold_year(years): + """The divested site reports up to and including the year before this one.""" + return years[-2] + +# ---------------------------------------------------------------- data quality +def gen_quality(seed, d): + r = rng_for(ENV + "/data-quality", seed, d) + org, year = r.choice(ORGS), r.randint(2019, 2024) + n = {1: 3, 2: 5, 3: 6}[d] + factor = round(r.uniform(0.08, 0.45), 3) + months = ["%d-%02d" % (year, m) for m in range(1, 13)] + while True: + meters = ["M%02d" % i for i in sorted(r.sample(range(1, 60), n))] + sites = sorted(r.sample(SITES, 2 if d < 3 else 3)) + site_of = dict((m, sites[i] if i < len(sites) else r.choice(sites)) for i, m in enumerate(meters)) + gaps = dict((m, []) for m in meters) + if d >= 2: + for m in r.sample(meters, 2 if d == 2 else 3): + first = r.randint(1, 10) + gaps[m] = [first] + ([r.randint(first + 2, 10)] if d == 3 and first <= 8 and r.random() < 0.5 else []) + rows, clean, dups, filled = [], {}, {}, {} + for m in meters: + base = r.uniform(1500, 40000) + vals = [int(round(base * (1 + 0.35 * abs(6.5 - k) / 5.5 * r.uniform(0.6, 1.2)) * r.uniform(0.9, 1.1))) for k in range(1, 13)] + present = [k for k in range(12) if k not in gaps[m]] + twice = r.sample(present, r.randint(0, 3)) + dups[m] = len(twice) + def row(k): + unit = "MWh" if (d == 3 and r.random() < 0.35) else "kWh" + return {"meter_id": m, "site": site_of[m], "month": months[k], "consumption": "%.3f" % (vals[k] / 1000.0) if unit == "MWh" else vals[k], "unit": unit} + for k in present: + first = row(k); first["invoice_ref"] = "E%06d" % r.randint(100000, 999999) + rows.append(first) + if k in twice: + again = row(k) if d == 3 else dict(first) + again["invoice_ref"] = first["invoice_ref"] + rows.append(again) + filled[m] = dict((months[k], fill_gap(vals[k - 1], vals[k + 1])) for k in gaps[m]) + clean[m] = [filled[m][months[k]] if k in gaps[m] else float(vals[k]) for k in range(12)] + by_month = sorted(((sum(clean[m][k] for m in meters), months[k]) for k in range(12)), reverse=True) + if sum(dups.values()) < 2 or by_month[0][0] - by_month[1][0] < 0.02 * by_month[0][0]: continue + break + r.shuffle(rows) + checks = [] + for m in meters: checks += [c_num("meters.%s.annual_kwh" % m, sum(clean[m]), 1), c_int("meters.%s.duplicate_rows" % m, dups[m])] + total = sum(sum(clean[m]) for m in meters) + checks += [c_int("duplicate_rows_removed", sum(dups.values())), c_num("total_kwh", total, 1), c_num("total_t_co2e", total * factor / 1000.0, 2, weight=2)] + rules = ["A meter should have exactly one row per month. Where a meter has more than one row for the same month, the later rows are duplicates loaded twice: " + "they always carry the same consumption as the first%s. Keep one row and drop the rest." % (" once both are in the same unit" if d == 3 else "")] + more = "" + if d >= 2: + rules.append("Where a meter has no row for a month, fill it with the mean of that meter's consumption in the month before and the month after. " + "A missing month always has both neighbours present, and it is never January or December.") + for m in meters: + for mo, v in sorted(filled[m].items()): checks.append(c_num("filled.%s.%s" % (m, mo), v, 1)) + checks.append(c_set("meters_with_gap", [m for m in meters if gaps[m]], weight=2)) + more += ("\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) " + "giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).") + if d == 3: + rules.insert(0, "The `consumption` column mixes units: each row is in kWh or in MWh as its `unit` says. Convert everything to kWh first (1 MWh = 1000 kWh).") + by_site = dict((s, sum(sum(clean[m]) for m in meters if site_of[m] == s) * factor / 1000.0) for s in sites) + checks += [c_num("by_site_t_co2e.%s" % s, by_site[s], 2) for s in sites] + [c_str("peak_month", by_month[0][1])] + more += ("\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals." + "\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.") + rules.append("Emissions = cleaned consumption in kWh x the electricity emission factor, converted from kg to tonnes (1 tonne = 1000 kg).") + rfile = "# Data rules for the %d electricity return\n\n- Electricity emission factor: %.3f kg CO2e per kWh (use this value).\n\n%s\n" % (year, factor, "\n".join("%d. %s" % (i + 1, x) for i, x in enumerate(rules))) + inst = """# Emissions inventory: cleaning the meter data + +`meter_readings.csv` is the %d monthly electricity consumption export for the meters of %s (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor. + +Write `answer.json` in this folder, a JSON object with: + +- `meters`: an object keyed by meter id, each with + - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal. + - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none). +- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer. +- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal. +- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.%s + +Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for. +""" % (year, org, more) + return Task(ENV, "data-quality", seed, d, "Cleaning meter data for %d meters" % n, inst, + {"meter_readings.csv": to_csv(rows, ["meter_id", "site", "month", "consumption", "unit", "invoice_ref"]), "data_rules.md": rfile}, checks, {"meters": n}) + +FAMILIES = {"activity-data": gen_activity, "multi-gas": gen_multigas, "time-series": gen_series, "data-quality": gen_quality} + +def generate(seed, difficulty, family=None): + fam = family or sorted(FAMILIES)[seed % len(FAMILIES)] + return FAMILIES[fam](seed, difficulty) diff --git a/envs/emissions_inventory/oracle.py b/envs/emissions_inventory/oracle.py new file mode 100644 index 0000000000000000000000000000000000000000..27a2b307ddbf11ae43e3012bbf778a030565cdcd --- /dev/null +++ b/envs/emissions_inventory/oracle.py @@ -0,0 +1,138 @@ +#!/usr/bin/env python3 +"""Reference solution for Emissions Inventory. Works only from the files in the current directory.""" +import csv, json, os, re + +def rows(name): + with open(name, newline="") as f: return list(csv.DictReader(f)) + +def text(name): + with open(name) as f: return f.read() + +def activity(): + year = re.search(r"Reporting year:\s*(\d{4})", text("inventory_boundary.md")).group(1) + factors = dict((r["source"], r) for r in rows("emission_factors.csv")) + conv = rows("unit_conversions.csv") + recs = rows("activity_data.csv") + by_source, by_scope, by_site, outside = {}, {"scope_1": 0.0, "scope_2": 0.0, "scope_3": 0.0}, {}, 0.0 + for r in recs: + if r["invoice_date"][:4] != year: continue + f = factors[r["source"]] + q = float(r["quantity"]) + if r["unit"] != f["unit"]: + hit = [c for c in conv if c["from_unit"] == r["unit"] and c["to_unit"] == f["unit"] and (c["applies_to"] == "all" or r["source"] in c["applies_to"].split(";"))] + assert len(hit) == 1, (r, hit) + q *= float(hit[0]["multiply_by"]) + e = q * float(f["factor_kg_co2e_per_unit"]) / 1000.0 + by_source[r["source"]] = by_source.get(r["source"], 0.0) + e + if f["scope"] in ("1", "2", "3"): + by_scope["scope_" + f["scope"]] += e + by_site[r["site"]] = by_site.get(r["site"], 0.0) + e + else: outside += e + total = sum(by_scope.values()) + in_scope = [s for s in by_source if factors[s]["scope"] in ("1", "2", "3")] + r2 = lambda d_: dict((k, round(v, 2)) for k, v in d_.items()) + return {"by_source": r2(by_source), "by_scope": r2(by_scope), "by_site": r2(by_site), "total_t_co2e": round(total, 2), "outside_scopes_t_co2e": round(outside, 2), + "scope_share_percent": dict((k, round(100 * v / total, 1)) for k, v in by_scope.items()), "largest_source": max(in_scope, key=lambda s: by_source[s])} + +def multigas(): + gwp = {} + for line in text("gwp_values.md").splitlines(): + cells = [c.strip() for c in line.strip().strip("|").split("|")] + if line.strip().startswith("|") and len(cells) == 2 and re.match(r"^[0-9.]+$", cells[1]): gwp[cells[0]] = float(cells[1]) + factors = dict((r["category"], r) for r in rows("gas_factors.csv")) + to_unit = {("m3", "litre"): 1000.0, ("kg", "tonne"): 0.001} + ans = {"sources": {}} + tot = {"co2_t": 0.0, "ch4_t_co2e": 0.0, "n2o_t_co2e": 0.0} + full = {} + for r in rows("sources.csv"): + f = factors[r["category"]] + amount = float(r["amount"]) * (1.0 if r["unit"] == f["unit"] else to_unit[(r["unit"], f["unit"])]) + co2 = amount * float(f["co2_kg_per_unit"]) / 1000.0 + ch4 = amount * float(f["ch4_g_per_unit"]) / 1000.0 + n2o = amount * float(f["n2o_g_per_unit"]) / 1000.0 + e = co2 * gwp["CO2"] + ch4 * gwp["CH4"] / 1000.0 + n2o * gwp["N2O"] / 1000.0 + ans["sources"][r["source_id"]] = {"co2_t": round(co2, 2), "ch4_kg": round(ch4, 2), "n2o_kg": round(n2o, 2), "co2e_t": round(e, 2)} + full[r["source_id"]] = e + tot["co2_t"] += co2; tot["ch4_t_co2e"] += ch4 * gwp["CH4"] / 1000.0; tot["n2o_t_co2e"] += n2o * gwp["N2O"] / 1000.0 + hfc = 0.0 + if os.path.exists("refrigerant_log.csv"): + for r in rows("refrigerant_log.csv"): hfc += float(r["topped_up_kg"]) * gwp[r["refrigerant"]] / 1000.0 + grand = sum(tot.values()) + hfc + ans["totals"] = dict((k, round(v, 2)) for k, v in tot.items()) + ans["totals"]["co2e_t"] = round(grand, 2) + ans.update(refrigerants_t_co2e=round(hfc, 3), non_co2_share_percent=round(100 * (grand - tot["co2_t"]) / grand, 1), largest_source=max(full, key=lambda s: full[s])) + return ans + +def series(): + target = text("target.md") + base = int(re.search(r"Base year:\s*(\d{4})", target).group(1)) + target_year = int(re.search(r"Target year:\s*(\d{4})", target).group(1)) + cut = float(re.search(r"([0-9.]+)\s*% below", target).group(1)) + totals, output = {}, {} + if os.path.exists("annual_emissions.csv"): + for r in rows("annual_emissions.csv"): + totals[int(r["year"])] = float(r["scope_1_t"]) + float(r["scope_2_t"]) + float(r["scope_3_t"]) + output[int(r["year"])] = float(r["output"]) + else: + ledger, out = rows("emissions_ledger.csv"), rows("output.csv") + sold = re.search(r"Divested site:\s*(\w+)", target) + still = set(r["site"] for r in ledger) - set([sold.group(1)] if sold else []) + for r in ledger: + if r["site"] not in still: continue + y = int(r["year"]) + totals[y] = totals.get(y, 0.0) + float(r["amount"]) / (1000.0 if r["unit"] == "kg" else 1.0) + for r in out: + if "site" in r and r["site"] not in still: continue + output[int(r["year"])] = output.get(int(r["year"]), 0.0) + float(r["output"]) + years = sorted(totals) + latest = years[-1] + ans = {"years": {}} + for i, y in enumerate(years): + o = {"total_t_co2e": round(totals[y], 1), "intensity_kg_per_unit": round(totals[y] * 1000.0 / output[y], 1)} + if y != base: + o["change_vs_previous_percent"] = round((totals[y] - totals[years[i - 1]]) / totals[years[i - 1]] * 100, 1) + o["change_vs_base_percent"] = round((totals[y] - totals[base]) / totals[base] * 100, 1) + ans["years"][str(y)] = o + goal = totals[base] * (1 - cut / 100.0) + left = target_year - latest + path = totals[base] - (totals[base] - goal) * (latest - base) / float(target_year - base) + ans.update(target_t_co2e=round(goal, 1), required_annual_reduction_t=round((totals[latest] - goal) / left, 1), linear_path_latest_t=round(path, 1), + on_track=totals[latest] <= path, required_annual_reduction_percent=round((1 - (goal / totals[latest]) ** (1.0 / left)) * 100, 2)) + return ans + +def quality(): + factor = float(re.search(r"emission factor:\s*([0-9.]+)", text("data_rules.md")).group(1)) + seen, dups, site = {}, {}, {} + for r in rows("meter_readings.csv"): + m = r["meter_id"] + site[m] = r["site"]; seen.setdefault(m, {}); dups.setdefault(m, 0) + kwh = float(r["consumption"]) * (1000.0 if r["unit"] == "MWh" else 1.0) + if r["month"] in seen[m]: + assert abs(seen[m][r["month"]] - kwh) < 1e-6 + dups[m] += 1 + else: seen[m][r["month"]] = kwh + year = sorted(next(iter(seen.values())))[0][:4] + months = ["%s-%02d" % (year, k) for k in range(1, 13)] + ans = {"meters": {}, "filled": {}, "meters_with_gap": []} + month_total, site_total, total = dict((mo, 0.0) for mo in months), {}, 0.0 + for m, have in seen.items(): + filled = {} + for i, mo in enumerate(months): + if mo not in have: filled[mo] = (have[months[i - 1]] + have[months[i + 1]]) / 2.0 + if filled: + ans["filled"][m] = dict((mo, round(v, 1)) for mo, v in filled.items()); ans["meters_with_gap"].append(m) + have = dict(have); have.update(filled) + annual = sum(have.values()) + ans["meters"][m] = {"annual_kwh": round(annual, 1), "duplicate_rows": dups[m]} + for mo in months: month_total[mo] += have[mo] + site_total[site[m]] = site_total.get(site[m], 0.0) + annual + total += annual + ans.update(duplicate_rows_removed=sum(dups.values()), total_kwh=round(total, 1), total_t_co2e=round(total * factor / 1000.0, 2), + by_site_t_co2e=dict((s, round(v * factor / 1000.0, 2)) for s, v in site_total.items()), peak_month=max(months, key=lambda mo: month_total[mo])) + return ans + +if os.path.exists("activity_data.csv"): answer = activity() +elif os.path.exists("gwp_values.md"): answer = multigas() +elif os.path.exists("target.md"): answer = series() +else: answer = quality() +with open("answer.json", "w") as f: json.dump(answer, f, indent=1) diff --git a/envs/exposure_assessment/__init__.py b/envs/exposure_assessment/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/envs/exposure_assessment/env.toml b/envs/exposure_assessment/env.toml new file mode 100644 index 0000000000000000000000000000000000000000..cedc8f9598218148f4c18fae0b8763583c3987e0 --- /dev/null +++ b/envs/exposure_assessment/env.toml @@ -0,0 +1,7 @@ +name = "exposure-assessment" +title = "Exposure Assessment" +isced = "1022" +summary = "Do an occupational hygienist's sums from workplace records: noise dose, airborne chemical averages, hand-arm vibration and injury rates against given limits." +task_type = "exposure calculation" +good_for = ["Logarithmic and root-sum-square arithmetic on logs", "Filtering records by a written definition", "Comparing results with supplied limit values"] +families = ["noise", "chemicals", "vibration", "incidents"] diff --git a/envs/exposure_assessment/gen.py b/envs/exposure_assessment/gen.py new file mode 100644 index 0000000000000000000000000000000000000000..40fd4c31fd5052d0757a127bd0891c1833a7cd6f --- /dev/null +++ b/envs/exposure_assessment/gen.py @@ -0,0 +1,685 @@ +"""Exposure Assessment (ISCED-F 1022 Occupational health and safety). + +Four task families, all from synthetic workplace records: + noise daily personal noise exposure L_EX,8h from a task diary, weekly exposure, extra time before a limit + chemicals 8-hour time-weighted averages from air samples, ppm <-> mg/m3, exposure index, additive mixture index + vibration daily hand-arm vibration exposure A(8) for several tools, time for each tool alone to reach a value + incidents lost-time injury frequency rate and severity rate from an incident log and an hours-worked table + +Methods (the formulas are also written out in every task, so nothing rests on recall): + L_EX,8h = 10 log10((1/8) sum t_i 10^(L_i/10)), t in hours: ISO 9612:2009 / ISO 1999; also Directive 2003/10/EC. + Weekly exposure = 10 log10((1/5) sum over the days worked of 10^(L_EX,8h/10)): ISO 1999 normalisation to a + nominal 5-day week, as used in Directive 2003/10/EC Art. 3(3) and UK HSE guidance L108. + 8-hour TWA = sum(C_i t_i) / 480 min: standard occupational hygiene practice (e.g. UK HSE EH40, "Calculation of + exposure with regard to the specified reference periods"). + mg/m3 = ppm x M / 24.45 (molar volume of an ideal gas at 25 deg C and 101.3 kPa): NIOSH / ACGIH convention. + Additive mixture index = sum(C_i / OEL_i) for substances with similar effects: ACGIH TLV mixture formula, EH40. + A(8) = sqrt(sum a_i^2 t_i / 8 h), time to a value = 8 h x (value / a)^2, vibration total value + a_hv = sqrt(ax^2 + ay^2 + az^2): ISO 5349-1:2001 and ISO 5349-2; also Directive 2002/44/EC. + Frequency rate = injuries x K / hours worked, severity rate = days lost x K / hours worked: ILO resolution on + statistics of occupational injuries (16th ICLS, 1998); K is stated in each task. + +Every action value, limit value and occupational exposure limit is supplied in the task as "use these values". +They are exercise values and are not presented as any country's law. Molar masses are standard values and are +supplied in the task table as well. +""" +import math +from practice.core import Task, rng_for, to_csv, c_int, c_num, c_str, c_set, clear_of + +ENV = "exposure-assessment" +NOTE = "Use these values. They are set for this exercise and are not presented as any country's legal limits." +TOL = "Numbers are accepted within one unit of the last decimal place asked for." + +def hhmm(m): return "%02d:%02d" % (m // 60, m % 60) + +# ---------------------------------------------------------------- noise +def lex8h(parts): + """Daily personal noise exposure in dB(A). parts: (hours, level in dB(A)) per task.""" + return 10 * math.log10(sum(t * 10 ** (L / 10.0) for t, L in parts) / 8.0) + +def lex_week(dailies): + """Weekly exposure from the L_EX,8h of each day worked, normalised to five 8-hour days.""" + return 10 * math.log10(sum(10 ** (L / 10.0) for L in dailies) / 5.0) + +def extra_hours(parts, level, limit): + """Hours that can be added at `level` before L_EX,8h reaches `limit`; 0 if it is already there.""" + room = 8.0 * 10 ** (limit / 10.0) - sum(t * 10 ** (L / 10.0) for t, L in parts) + return max(0.0, room / 10 ** (level / 10.0)) + +def noise_band(L, lower, upper, limit): + return "over_limit" if L > limit else "upper_action" if L >= upper else "lower_action" if L >= lower else "below_lower_action" + +NOISE_TASKS = [("angle grinding", 96, 102), ("pneumatic chiselling", 99, 105), ("circular saw", 94, 99), ("sand blasting", 100, 106), + ("press brake", 88, 93), ("compressor room checks", 90, 95), + ("welding", 84, 90), ("forklift driving", 81, 86), ("packing line", 79, 85), ("assembly bench", 74, 81), + ("stores and dispatch", 68, 76), ("office and paperwork", 56, 65)] +DAYS = ["Mon", "Tue", "Wed", "Thu", "Fri"] + +def noise_values_doc(lower, upper, limit): + return """# Noise exposure values for this assessment + +%s + +| Value | dB(A) | +|---|---| +| Lower action value | %d | +| Upper action value | %d | +| Limit value | %d | + +## Bands + +- `below_lower_action`: the exposure is below the lower action value. +- `lower_action`: at or above the lower action value and below the upper action value. +- `upper_action`: at or above the upper action value and not above the limit value. +- `over_limit`: above the limit value. +""" % (NOTE, lower, upper, limit) + +def _noise_jobs(r, levels): + """One day's jobs as (task, minutes, level); `levels` fixes the level per task, or None to draw one per job.""" + while True: + k = r.randint(3, 4) + nl = min(k - 1, r.choice([0, 0, 1, 1, 2])) + picks = r.sample(NOISE_TASKS[:6], nl) + r.sample(NOISE_TASKS[6:], k - nl) + r.shuffle(picks) + jobs = [] + for name, lo, hi in picks: + lv = levels[name] if levels else round(r.uniform(lo, hi), 1) + mins = r.choice([5, 10, 15, 20, 30] if lv >= 95 else [15, 30, 45, 60, 90] if lv >= 88 else [45, 60, 90, 120, 150, 180, 240]) + jobs.append((name, mins, lv)) + if sum(j[1] for j in jobs) <= 540: return jobs + +def _clock(r, jobs): + """Lay the jobs out through a shift; returns (task, start, end) with short unlisted gaps between them.""" + t = 360 + r.choice([0, 30, 60, 90]); out = [] + for name, mins, _ in jobs: + t += r.choice([0, 0, 5, 10, 15, 30]) + out.append((name, hhmm(t), hhmm(t + mins))); t += mins + return out + +def gen_noise(seed, d): + r = rng_for(ENV + "/noise", seed, d) + lower, upper, limit = r.choice([(80, 85, 87), (80, 85, 90), (77, 82, 85)]) + thr = [lower, upper, limit] + n = {1: 3, 2: 5, 3: 4}[d] + wids = ["W%02d" % i for i in sorted(r.sample(range(1, 60), n))] + levels = None + if d >= 2: levels = dict((name, round(r.uniform(lo, hi), 1)) for name, lo, hi in NOISE_TASKS) + rows, checks, planned, res = [], [], [], {} + for w in wids: + if d == 1: + while True: + jobs = _noise_jobs(r, None) + L = lex8h([(m / 60.0, lv) for _, m, lv in jobs]) + if clear_of(L, thr, 0.3): break + for name, m, lv in jobs: rows.append({"worker_id": w, "task": name, "duration_min": m, "laeq_db": lv}) + res[w] = L + checks.append(c_num("workers.%s.lex8h_db" % w, L, 1)) + elif d == 2: + cands = sorted(name for name in levels if levels[name] >= limit + 2) + while True: + jobs = _noise_jobs(r, levels) + parts = [(m / 60.0, lv) for _, m, lv in jobs] + L = lex8h(parts) + if not clear_of(L, thr, 0.3): continue + pt = r.choice(cands) + mins = extra_hours(parts, levels[pt], limit) * 60.0 + if L > limit: extra = 0 + elif mins > 300 or not 0.05 <= mins % 1 <= 0.95: continue + else: extra = int(mins) + break + for name, s, e in _clock(r, jobs): rows.append({"worker_id": w, "task": name, "start": s, "end": e}) + planned.append({"worker_id": w, "planned_task": pt}) + res[w] = L + checks += [c_num("workers.%s.lex8h_db" % w, L, 1), c_int("workers.%s.extra_minutes" % w, extra)] + else: + while True: + days = sorted(r.sample(range(5), r.randint(3, 5))) + per_day = [(DAYS[i], _noise_jobs(r, levels)) for i in days] + daily = [lex8h([(m / 60.0, lv) for _, m, lv in jobs]) for _, jobs in per_day] + L = lex_week(daily) + top = sorted(daily, reverse=True) + if clear_of(L, thr, 0.3) and top[0] - top[1] >= 0.3: break + for (day, jobs), Ld in zip(per_day, daily): + for name, s, e in _clock(r, jobs): rows.append({"worker_id": w, "day": day, "task": name, "start": s, "end": e}) + checks.append(c_num("workers.%s.daily_lex8h_db.%s" % (w, day), Ld, 1)) + res[w] = L + checks += [c_num("workers.%s.weekly_lex_db" % w, L, 1), + c_str("workers.%s.loudest_day" % w, per_day[daily.index(max(daily))][0])] + checks.append(c_str("workers.%s.band" % w, noise_band(res[w], lower, upper, limit))) + checks.append(c_set("at_or_above_upper_action", sorted(w for w in wids if res[w] >= upper), weight=2)) + r.shuffle(rows) + files = {"exposure_values.md": noise_values_doc(lower, upper, limit)} + formula = """ L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) ) + +with t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.""" + if d == 1: + files["noise_diary.csv"] = to_csv(rows, ["worker_id", "task", "duration_min", "laeq_db"]) + intro = "`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A))." + keys = [" - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.", + " - `band`: the band of that exposure, one of the four names in `exposure_values.md`."] + basis = "L_EX,8h" + else: + lv_rows = [{"task": name, "laeq_db": levels[name], "lcpeak_db": round(levels[name] + r.uniform(14, 26), 1), + "measured_by": r.choice(["sound level meter", "dosimeter"])} for name, _, _ in NOISE_TASKS] + r.shuffle(lv_rows) + files["task_levels.csv"] = to_csv(lv_rows, ["task", "laeq_db", "lcpeak_db", "measured_by"]) + if d == 2: + files["noise_diary.csv"] = to_csv(rows, ["worker_id", "task", "start", "end"]) + files["planned_work.csv"] = to_csv(planned, ["worker_id", "planned_task"]) + intro = ("`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. " + "`task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). " + "`planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary.") + keys = [" - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.", + " - `band`: the band of that exposure, one of the four names in `exposure_values.md`.", + " - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. " + "Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value."] + basis = "L_EX,8h" + else: + files["noise_diary.csv"] = to_csv(rows, ["worker_id", "day", "task", "start", "end"]) + intro = ("`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. " + "`task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed).") + keys = [" - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.", + " - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.", + " - `loudest_day`: the day with the highest L_EX,8h.", + " - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`."] + formula += """ + +The weekly exposure is normalised to five 8-hour days whatever the number of days worked: + + L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )""" + basis = "weekly exposure" + inst = """# Noise exposure assessment + +%s `exposure_values.md` gives the action and limit values to use and the band names. + +%s the daily personal noise exposure is + +%s + +Write `answer.json` in this folder, a JSON object with: + +- `workers`: an object keyed by worker id, each with +%s +- `at_or_above_upper_action`: list of the worker ids whose %s is at or above the upper action value, including any above the limit value (any order; an empty list if none). + +%s +""" % (intro, "For each worker and each day worked" if d == 3 else "For each worker", formula, "\n".join(keys), basis, TOL) + return Task(ENV, "noise", seed, d, "Noise exposure for %d workers" % n, inst, files, checks, {"workers": n}) + +# ---------------------------------------------------------------- airborne chemicals +MOLAR_VOLUME = 24.45 # litres per mole at 25 deg C and 101.3 kPa + +def ppm_to_mg(ppm, molar_mass): return ppm * molar_mass / MOLAR_VOLUME +def mg_to_ppm(mg, molar_mass): return mg * MOLAR_VOLUME / molar_mass + +def twa8(samples, shift_min=480, unsampled="zero"): + """8-hour time-weighted average. samples: (minutes, concentration). + unsampled 'zero': time outside the samples counts as no exposure. + unsampled 'as_sampled': the whole shift is taken to be at the time-weighted mean of the sampled periods.""" + ct = sum(t * c for t, c in samples) + if unsampled == "zero": return ct / 480.0 + return ct / float(sum(t for t, _ in samples)) * shift_min / 480.0 + +def mixture_index(pairs): + """Additive index for substances with similar effects. pairs: (concentration, limit) in the same unit.""" + return sum(c / float(oel) for c, oel in pairs) + +# name, molar mass (g/mol), exercise limit options (mg/m3), effect group +SUBSTANCES = [("toluene", 92.14, (150, 190), "narcotic"), ("xylene", 106.17, (200, 220), "narcotic"), + ("acetone", 58.08, (600, 1200), "narcotic"), ("butanone", 72.11, (300, 600), "narcotic"), + ("styrene", 104.15, (85, 100), "narcotic"), ("ethyl_acetate", 88.11, (500, 730), "narcotic"), + ("ammonia", 17.03, (14, 18), "irritant"), ("acetic_acid", 60.05, (25, 30), "irritant"), + ("formic_acid", 46.03, (9, 12), "irritant"), ("hydrogen_chloride", 36.46, (8, 10), "irritant")] +JOBS = ["spray painter", "degreasing operator", "laminator", "print finisher", "tank cleaner", "adhesive mixer", "laboratory technician", "coating line operator"] + +def _draw_samples(r, target, oel, shift, unsampled): + """Personal samples (minutes, mg/m3) whose 8-hour TWA is near `target` (mg/m3).""" + while True: + durs = [r.choice([45, 60, 75, 90, 105, 120, 150]) for _ in range(r.randint(2, 4))] + if 150 <= sum(durs) <= min(shift, 480): break + base = target * 480.0 / (sum(durs) if unsampled == "zero" else shift) + dec = 1 if oel >= 50 else 2 + return [(t, max(round(base * r.uniform(0.6, 1.4), dec), 10 ** -dec)) for t in durs] + +def gen_chemicals(seed, d): + r = rng_for(ENV + "/chemicals", seed, d) + n = {1: 3, 2: 5, 3: 4}[d] + wids = ["W%02d" % i for i in sorted(r.sample(range(1, 60), n))] + table = {} + for name, M, opts, grp in SUBSTANCES: + oel = float(r.choice(opts)); unit = "mg/m3"; shown = oel + if d == 3 and r.random() < 0.5: # some limits are tabled in ppm + shown = mg_to_ppm(oel, M) + shown = float(round(shown)) if shown >= 10 else round(shown, 1) + unit = "ppm"; oel = ppm_to_mg(shown, M) + table[name] = {"M": M, "oel_mg": oel, "shown": shown, "unit": unit, "group": grp} + rows, wrows, checks, over = [], [], [], [] + for w in wids: + shift = 480 if d == 1 else r.choice([420, 450, 480, 510, 540, 600]) + uns = "zero" if d == 1 else r.choice(["zero", "as_sampled"]) + while True: + if d < 3: subs = [r.choice(SUBSTANCES)[0]] + else: + grp = r.choice(["narcotic", "irritant"]) + same = sorted(s[0] for s in SUBSTANCES if s[3] == grp); other = sorted(s[0] for s in SUBSTANCES if s[3] != grp) + subs = r.sample(same, 2) + (r.sample(other, 1) if r.random() < 0.6 else []) + mine, out, groups = [], {}, {} + for i, s in enumerate(subs): + t = table[s] + if d < 3: idx = r.choice([r.uniform(0.2, 0.6), r.uniform(0.7, 0.93), r.uniform(1.08, 1.8)]) + else: idx = r.uniform(0.15, 0.8) if i < 2 else r.uniform(0.2, 1.5) + smp = [] + for mins, c in _draw_samples(r, idx * t["oel_mg"], t["oel_mg"], shift, uns): + if d >= 2 and r.random() < 0.5: # a direct-reading instrument reports ppm + v = round(mg_to_ppm(c, t["M"]), 2) + smp.append((mins, v, "ppm", ppm_to_mg(v, t["M"]))) + else: smp.append((mins, c, "mg/m3", c)) + twa = twa8([(m, mg) for m, _, _, mg in smp], shift, uns) + out[s] = (twa, twa / t["oel_mg"]) + groups.setdefault(t["group"], []).append((twa, t["oel_mg"])) + mine.append((s, smp)) + gidx = dict((g, mixture_index(p)) for g, p in groups.items()) + if all(abs(v - 1) >= 0.05 for v in gidx.values()) and all(abs(v[1] - 1) >= 0.05 for v in out.values()): break + for s, smp in mine: + t = table[s] + for mins, v, unit, _ in smp: + rows.append({"worker_id": w, "substance": s, "sample_type": "personal", "duration_min": mins, "concentration": v, "unit": unit}) + if d >= 2: # static (area) samples and field blanks must be left out + for _ in range(r.randint(0, 2)): + rows.append({"worker_id": w, "substance": s, "sample_type": "static", "duration_min": r.choice([60, 120, 180, 240]), + "concentration": round(t["oel_mg"] * r.uniform(0.2, 2.5), 1), "unit": "mg/m3"}) + if r.random() < 0.5: + rows.append({"worker_id": w, "substance": s, "sample_type": "blank", "duration_min": 0, "concentration": 0.0, "unit": "mg/m3"}) + wrows.append({"worker_id": w, "job": r.choice(JOBS), "shift_min": shift, "unsampled_time": uns}) + if d < 3: + s = subs[0] + checks.append(c_num("workers.%s.twa_mg_m3" % w, out[s][0], 2)) + if d == 2: checks.append(c_num("workers.%s.twa_ppm" % w, mg_to_ppm(out[s][0], table[s]["M"]), 2)) + checks.append(c_num("workers.%s.exposure_index" % w, out[s][1], 2)) + else: + for s in sorted(out): + checks += [c_num("workers.%s.substances.%s.twa_mg_m3" % (w, s), out[s][0], 2), + c_num("workers.%s.substances.%s.exposure_index" % (w, s), out[s][1], 2)] + for g in sorted(gidx): checks.append(c_num("workers.%s.group_index.%s" % (w, g), gidx[g], 2)) + if max(gidx.values()) > 1: over.append(w) + checks.append(c_set("over_limit", over, weight=2)) + r.shuffle(rows) + for i, row in enumerate(rows): row["sample_id"] = "S%03d" % (i + 1) + trows = [{"substance": s, "molar_mass_g_per_mol": table[s]["M"], "oel_8h": table[s]["shown"], "oel_unit": table[s]["unit"], + "effect_group": table[s]["group"]} for s in table] + r.shuffle(trows) + files = {"oel_table.csv": to_csv(trows, ["substance", "molar_mass_g_per_mol", "oel_8h", "oel_unit", "effect_group"])} + limits = ("`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. " + "Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.") + conv = " mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)" + if d == 1: + files["samples.csv"] = to_csv([dict(x, concentration_mg_m3=x["concentration"]) for x in rows], + ["sample_id", "worker_id", "substance", "duration_min", "concentration_mg_m3"]) + intro = "`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance." + method = """The 8-hour time-weighted average (TWA) is + + TWA = sum( C_i * t_i ) / 480 + +with C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.""" + keys = [" - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.", + " - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals."] + last = "- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none)." + else: + files["samples.csv"] = to_csv(rows, ["sample_id", "worker_id", "substance", "sample_type", "duration_min", "concentration", "unit"]) + files["workers.csv"] = to_csv(wrows, ["worker_id", "job", "shift_min", "unsampled_time"]) + intro = ("`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. " + "Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. " + "Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n" + conv) + method = """The 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes: + +- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480. +- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.""" + if d == 2: + keys = [" - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.", + " - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.", + " - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals."] + last = "- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none)." + intro = intro.replace("from one survey day", "from one survey day (each worker was sampled for one substance)") + else: + limits += " Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula." + method += """ + +Each worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.""" + keys = [" - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).", + " - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals."] + last = "- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none)." + inst = """# Airborne chemical exposure + +%s + +%s + +%s + +Write `answer.json` in this folder, a JSON object with: + +- `workers`: an object keyed by worker id, each with +%s +%s + +%s +""" % (intro, limits, method, "\n".join(keys), last, TOL) + return Task(ENV, "chemicals", seed, d, "Airborne exposure for %d workers" % n, inst, files, checks, {"workers": n}) + +# ---------------------------------------------------------------- hand-arm vibration +def a8(parts): + """Daily vibration exposure A(8) in m/s2. parts: (magnitude in m/s2, exposure time in hours) per tool.""" + return math.sqrt(sum(a * a * t for a, t in parts) / 8.0) + +def minutes_to(a, value): + """Minutes of use of one tool with magnitude `a` for A(8) to reach `value`.""" + return 480.0 * (value / float(a)) ** 2 + +def total_value(ax, ay, az): + """Vibration total value from the three frequency-weighted axis values.""" + return math.sqrt(ax * ax + ay * ay + az * az) + +def vib_band(A, action, limit): + return "over_limit" if A > limit else "action_to_limit" if A >= action else "below_action" + +TOOLS = [("angle grinder", 4, 8), ("hammer drill", 8, 14), ("impact wrench", 5, 9), ("chipping hammer", 10, 18), ("orbital sander", 3, 6), + ("reciprocating saw", 6, 12), ("needle scaler", 8, 14), ("chainsaw", 4, 7), ("plate compactor", 5, 10), ("brush cutter", 3, 5), + ("nut runner", 2, 4), ("die grinder", 3, 6)] + +def vib_values_doc(action, limit): + return """# Hand-arm vibration values for this assessment + +%s + +| Value | m/s2 | +|---|---| +| Exposure action value | %.1f | +| Exposure limit value | %.1f | + +Both are daily exposures A(8). + +## Bands + +- `below_action`: A(8) is below the exposure action value. +- `action_to_limit`: A(8) is at or above the exposure action value and not above the exposure limit value. +- `over_limit`: A(8) is above the exposure limit value. +""" % (NOTE, action, limit) + +def _use_minutes(r, a): + base = r.choice([5, 10, 15, 20, 30, 40] if a >= 10 else [10, 20, 30, 45, 60, 90] if a >= 5 else [20, 30, 60, 90, 120, 180]) + return max(5, int(round(base * r.choice([0.4, 0.7, 1.0, 1.0, 1.5]) / 5.0)) * 5) + +def gen_vibration(seed, d): + r = rng_for(ENV + "/vibration", seed, d) + action, limit = r.choice([(2.5, 5.0), (2.5, 5.0), (2.0, 4.0)]) + n = {1: 4, 2: 5, 3: 5}[d] + oids = ["OP%02d" % i for i in sorted(r.sample(range(1, 50), n))] + rows, checks, res = [], [], {} + tools, trows = {}, [] + if d >= 2: + picks = r.sample(TOOLS, 7) + for i, (name, lo, hi) in enumerate(picks): + tid = "T%02d" % (i + 1) + row = {"tool_id": tid, "description": name, "last_tested": "%d-%02d" % (r.choice([2022, 2023]), r.randint(1, 12))} + if d == 2: + a = round(r.uniform(lo, hi), 1); row["vibration_m_s2"] = a + else: + w = [r.uniform(0.3, 1.0) for _ in range(3)]; norm = math.sqrt(sum(x * x for x in w)); tgt = r.uniform(lo, hi) + ax, ay, az = [round(tgt * x / norm, 2) for x in w] + row.update(ax_m_s2=ax, ay_m_s2=ay, az_m_s2=az); a = total_value(ax, ay, az) + tools[tid] = a; trows.append(row) + for o in oids: + while True: + if d == 1: + use = [(name, round(r.uniform(lo, hi), 1)) for name, lo, hi in r.sample(TOOLS, r.randint(2, 3))] + use = [(name, a, _use_minutes(r, a) * 60, None) for name, a in use] + else: + use = [] + for tid in r.sample(sorted(tools), r.randint(2, 3)): + log, secs = [], 0 + for _ in range(r.randint(1, 3)): + per = r.randint(5, 90) + ops = max(2, int(round(_use_minutes(r, tools[tid]) * 30.0 / per))) + log.append((ops, per)); secs += ops * per + use.append((tid, tools[tid], secs, log)) + A = a8([(a, s / 3600.0) for _, a, s, _ in use]) + part = sorted((a * a * s for _, a, s, _ in use), reverse=True) + if clear_of(A, [action, limit], 0.08) and (d < 3 or part[0] >= 1.15 * part[1]): break + res[o] = A + checks += [c_num("operators.%s.a8_m_s2" % o, A, 2), c_str("operators.%s.band" % o, vib_band(A, action, limit))] + if d == 3: checks.append(c_str("operators.%s.dominant_tool" % o, max(use, key=lambda u: u[1] * u[1] * u[2])[0])) + for name, a, secs, log in use: + if d == 1: rows.append({"operator_id": o, "tool": name, "vibration_m_s2": a, "trigger_time_min": secs // 60}) + else: + for ops, per in log: + rows.append({"operator_id": o, "tool_id": name, "job_ref": "J%04d" % r.randint(1000, 9999), "operations": ops, "seconds_per_operation": per}) + for tid in sorted(tools): + checks.append(c_num("tools.%s.minutes_to_action" % tid, minutes_to(tools[tid], action), 1)) + if d == 3: checks.append(c_num("tools.%s.minutes_to_limit" % tid, minutes_to(tools[tid], limit), 1)) + checks.append(c_set("at_or_above_action", sorted(o for o in oids if res[o] >= action), weight=2)) + r.shuffle(rows) + files = {"vibration_values.md": vib_values_doc(action, limit)} + formula = """ A(8) = sqrt( sum( a_i^2 * t_i ) / 8 ) + +with a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.""" + okeys = [" - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.", + " - `band`: one of the three band names in `vibration_values.md`."] + tkeys = "" + if d == 1: + files["tool_use.csv"] = to_csv(rows, ["operator_id", "tool", "vibration_m_s2", "trigger_time_min"]) + intro = "`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes." + else: + files["tool_use.csv"] = to_csv(rows, ["operator_id", "tool_id", "job_ref", "operations", "seconds_per_operation"]) + intro = ("`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. " + "An operator may have several rows for the same tool; add their times together.") + tcalc = """For each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value: + + time in minutes = 480 * ( value / a )^2 + +The result may be longer than a working day; report it as calculated.""" + if d == 2: + files["tools.csv"] = to_csv(trows, ["tool_id", "description", "vibration_m_s2", "last_tested"]) + intro += " `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`)." + tkeys = "\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal." + else: + files["tools.csv"] = to_csv(trows, ["tool_id", "description", "ax_m_s2", "ay_m_s2", "az_m_s2", "last_tested"]) + intro += (" `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n" + " a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it.") + okeys.append(" - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.") + tkeys = ("\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the " + "exposure action value and the exposure limit value, 1 decimal each.") + formula += "\n\n" + tcalc + inst = """# Hand-arm vibration assessment + +%s `vibration_values.md` gives the exposure action and limit values to use and the band names. + +For each operator the daily vibration exposure is + +%s + +Write `answer.json` in this folder, a JSON object with: + +- `operators`: an object keyed by operator id, each with +%s%s +- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none). + +%s +""" % (intro, formula, "\n".join(okeys), tkeys, TOL) + return Task(ENV, "vibration", seed, d, "Hand-arm vibration for %d operators" % n, inst, files, checks, {"operators": n}) + +# ---------------------------------------------------------------- incident statistics +def frequency_rate(n, hours, per): + """Lost-time injuries per `per` hours worked.""" + return n * float(per) / hours + +def severity_rate(days, hours, per): + """Days lost per `per` hours worked.""" + return days * float(per) / hours + +def is_lti(row): + """The stated definition: an injury to an employee, work-related, with at least one day lost.""" + return (row["type"] == "injury" and row.get("person_type", "employee") == "employee" + and row.get("work_related", "yes") == "yes" and row["days_lost"] >= 1) + +DEPTS = ["Fabrication", "Warehouse", "Assembly", "Maintenance", "Logistics", "Finishing"] +INJ = ["cut to hand from sheet metal", "slipped on wet floor", "strain while lifting a crate", "struck by falling part", "foot crushed by pallet truck", + "burn from hot surface", "fall from step ladder", "eye injury from swarf", "finger trapped in guard", "twisted ankle on stairs"] +OTHER = {"near miss": ["load slipped from forklift, nobody hit", "unguarded edge reported", "pallet fell from racking, area empty", "spill found on walkway"], + "property damage": ["forklift struck racking upright", "roller door damaged by vehicle", "pipework hit by reach truck"], + "ill health": ["dermatitis from cutting fluid", "work-related upper limb disorder", "noise-induced hearing loss claim"]} +RATE_SETS = [(1000000, 1000, 3), (200000, 200000, 2), (1000000, 1000000, 2)] + +def commas(n): return "{:,}".format(n) + +def gen_incidents(seed, d): + r = rng_for(ENV + "/incidents", seed, d) + year = r.choice([2021, 2022, 2023, 2024]) + years = [year - 1, year] if d == 3 else [year] + depts = sorted(r.sample(DEPTS, {1: 1, 2: 3, 3: 4}[d])) + per_f, per_s, sdec = r.choice(RATE_SETS) + cap = r.choice([150, 180, 200]) if d == 3 else None + while True: + log, hrows = [], [] + hours = dict(((y, dp), 0) for y in years for dp in depts) + for y in years: + for dp in depts: + base = r.randint(180, 320) * 100 if d == 1 else r.randint(60, 380) * 100 + for m in range(1, 13): + h = int(base * r.uniform(0.85, 1.12)) + hours[(y, dp)] += h + row = {"month": "%d-%02d" % (y, m), "department": dp, "hours": h} + if d == 3: row["workforce"] = "employees" + hrows.append(row) + if d == 3 and dp == depts[0]: # contractor hours are tabled too and must be left out + hrows.append({"month": "%d-%02d" % (y, m), "department": dp, "hours": int(base * r.uniform(0.1, 0.3)), "workforce": "contractors"}) + def add(y, dp, typ, days, person="employee", work="yes"): + desc = r.choice(INJ) if typ == "injury" else r.choice(OTHER[typ]) + if work == "no": desc = r.choice(["road accident on the way to work", "sports injury at the weekend", "fall on the way home"]) + treat = "none" if typ in ("near miss", "property damage") else r.choice(["medical treatment", "hospital"]) if days else r.choice(["first aid", "medical treatment"]) + log.append({"date": "%d-%02d-%02d" % (y, r.randint(1, 12), r.randint(1, 28)), "department": dp, "type": typ, "person_type": person, + "work_related": work, "treatment": treat, "days_lost": days, "description": desc}) + for y in years: + for dp in depts: + for _ in range(r.randint(2, 5) if d == 1 else r.randint(0, 4)): add(y, dp, "injury", r.choice([1, 2, 3, 4, 5, 7, 8, 10, 12, 14, 18, 21, 25, 30, 38, 45, 60])) + for _ in range(r.randint(3, 6) if d == 1 else r.randint(1, 3)): add(y, dp, "injury", 0) + for _ in range(r.randint(2, 5) if d == 1 else r.randint(0, 2)): add(y, dp, r.choice(["near miss", "near miss", "property damage"]), 0) + if d >= 2: + for _ in range(r.randint(0, 2)): add(y, dp, "injury", r.choice([0, 2, 5, 9, 16, 30]), person=r.choice(["contractor", "contractor", "visitor"])) + if r.random() < 0.5: add(y, dp, "injury", r.choice([3, 6, 11, 20]), work="no") + if r.random() < 0.5: add(y, dp, "ill health", r.choice([0, 4, 15, 40])) + if d == 3: add(y, r.choice(depts), "injury", cap + r.randint(10, 150)) # one long absence above the cap + log.sort(key=lambda x: x["date"]) + first = r.randint(100, 800) + for i, row in enumerate(log): row["incident_id"] = "INC-%04d" % (first + i) + stats = {} + for y in years: + for dp in depts + ["*"]: + ltis = [x for x in log if is_lti(x) and x["date"].startswith(str(y)) and (dp == "*" or x["department"] == dp)] + h = sum(hours[(y, q)] for q in depts) if dp == "*" else hours[(y, dp)] + days = sum(min(x["days_lost"], cap) if cap else x["days_lost"] for x in ltis) + stats[(y, dp)] = {"n": len(ltis), "days": days, "hours": h, "f": frequency_rate(len(ltis), h, per_f), "s": severity_rate(days, h, per_s), + "ids": [x["incident_id"] for x in ltis]} + if any(stats[(y, "*")]["n"] < 2 for y in years): continue + target = None + if d >= 2: + fs = [stats[(year, dp)]["f"] for dp in depts] + opts = [t * per_f / 1000000.0 for t in (3, 4, 5, 6, 8, 10, 12, 15, 20, 25, 30)] + opts = [t for t in opts if all(abs(f - t) >= 0.08 * t for f in fs)] + mixed = [t for t in opts if min(fs) < t < max(fs)] + if not opts: continue + target = r.choice(mixed or opts) + if d == 3 and abs(stats[(year, "*")]["f"] - stats[(year - 1, "*")]["f"]) < 0.05: continue + break + checks = [] + def block(path, s, full=True): + pre = path + "." if path else "" + out = [c_int(pre + "lti_count", s["n"])] + if full: out += [c_int(pre + "days_lost", s["days"]), c_int(pre + "hours_worked", s["hours"])] + return out + [c_num(pre + "ltifr", s["f"], 2), c_num(pre + "severity_rate", s["s"], sdec)] + cur = stats[(year, "*")] + if d == 1: + checks += block("", cur) + else: + for dp in depts: checks += block("departments.%s" % dp, stats[(year, dp)]) + if d == 2: checks += block("site", cur) + else: + for y in years: checks += block("site.%d" % y, stats[(y, "*")], full=False) + checks.append(c_num("ltifr_change", cur["f"] - stats[(year - 1, "*")]["f"], 2)) + checks.append(c_set("above_target", sorted(dp for dp in depts if stats[(year, dp)]["f"] > target), weight=2)) + checks.append(c_set("lti_ids", cur["ids"], weight=2)) + # reference file ------------------------------------------------------- + conds = ["- `type` is `injury` (near misses, property damage and ill health cases are not injuries);", "- `days_lost` is 1 or more;"] + if d >= 2: + conds += ["- `person_type` is `employee` (the hours table covers the company's own employees, so contractors and visitors are left out);", + "- `work_related` is `yes` (commuting and other incidents outside work are left out)."] + else: conds[-1] = conds[-1][:-1] + "." + days_txt = "Days lost are counted for lost-time injuries only." + if cap: days_txt += " The days lost for any single lost-time injury are capped at %d days: a longer absence counts as %d." % (cap, cap) + hours_txt = "Hours worked are the hours in `hours_worked.csv` for the period and unit in question." + if d == 3: hours_txt += " Use only the rows with `workforce` = `employees`." + defs = """# Incident statistics: definitions for this report + +Use these definitions and values. They are set for this exercise. + +## Lost-time injury (LTI) + +An incident in the log counts as a lost-time injury only if all of these hold: + +%s + +## Days lost + +%s + +## Hours worked + +%s + +## Rates + +- Frequency rate (LTIFR) = number of LTIs x %s / hours worked +- Severity rate = days lost x %s / hours worked +""" % ("\n".join(conds), days_txt, hours_txt, commas(per_f), commas(per_s)) + if target is not None: + defs += "\n## Target\n\nA department is above target when its LTIFR is higher than %s.\n" % ("%.1f" % target) + files = {"definitions.md": defs} + rate_keys = ("`lti_count` (integer), `days_lost` (integer, total days lost through LTIs%s), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (%d decimals)" + % (", after the cap" if cap else "", sdec)) + if d == 1: + files["incident_log.csv"] = to_csv(log, ["incident_id", "date", "type", "treatment", "days_lost", "description"]) + files["hours_worked.csv"] = to_csv(hrows, ["month", "hours"]) + body = ("`incident_log.csv` is one site's incident log for %d and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\n" + "Work out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n" + "- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n" + "- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, %d decimals.\n" + "- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).") % (year, sdec) + elif d == 2: + files["incident_log.csv"] = to_csv(log, ["incident_id", "date", "department", "type", "person_type", "work_related", "treatment", "days_lost", "description"]) + files["hours_worked.csv"] = to_csv(hrows, ["month", "department", "hours"]) + body = ("`incident_log.csv` is a site's incident log for %d and `hours_worked.csv` gives the hours worked by each department's employees each month. " + "`definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\n" + "Work out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n" + "- `departments`: an object keyed by department name, each with %s.\n" + "- `site`: the same five keys for all departments together.\n" + "- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n" + "- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).") % (year, rate_keys) + else: + files["incident_log.csv"] = to_csv(log, ["incident_id", "date", "department", "type", "person_type", "work_related", "treatment", "days_lost", "description"]) + files["hours_worked.csv"] = to_csv(hrows, ["month", "department", "workforce", "hours"]) + body = ("`incident_log.csv` is a site's incident log for %d and %d and `hours_worked.csv` gives the hours worked in each department each month. " + "`definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\n" + "Work out the figures for each department for %d, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n" + "- `departments`: an object keyed by department name, each with %s, all for %d.\n" + "- `site`: an object keyed by year (`\"%d\"` and `\"%d\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n" + "- `ltifr_change`: the site LTIFR for %d minus the site LTIFR for %d, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n" + "- `above_target`: list of the departments whose %d LTIFR is above the target (any order; an empty list if none).\n" + "- `lti_ids`: list of the incident ids counted as lost-time injuries in %d (any order).") % ( + year - 1, year, year, rate_keys, year, year - 1, year, year, year - 1, year, year) + inst = "# Incident statistics\n\n" + body + "\n\n" + TOL + "\n" + return Task(ENV, "incidents", seed, d, "Injury rates for %d" % year, inst, files, checks, {"departments": len(depts)}) + +FAMILIES = {"noise": gen_noise, "chemicals": gen_chemicals, "vibration": gen_vibration, "incidents": gen_incidents} + +def generate(seed, difficulty, family=None): + fam = family or sorted(FAMILIES)[seed % len(FAMILIES)] + return FAMILIES[fam](seed, difficulty) diff --git a/envs/exposure_assessment/oracle.py b/envs/exposure_assessment/oracle.py new file mode 100644 index 0000000000000000000000000000000000000000..a1f8f5b0f12874d8a1c55446c9b26e856610094c --- /dev/null +++ b/envs/exposure_assessment/oracle.py @@ -0,0 +1,177 @@ +#!/usr/bin/env python3 +"""Reference solution for Exposure Assessment. Works only from the files in the current directory.""" +import csv, json, os, re +from math import log10, sqrt, floor + +def rows(name): + with open(name, newline="") as f: return list(csv.DictReader(f)) + +def text(name): + with open(name) as f: return f.read() + +def table_value(doc, label): + """The number in the second column of the Markdown table row that starts with `label`.""" + m = re.search(r"\|\s*" + re.escape(label) + r"\s*\|\s*([0-9.]+)\s*\|", doc) + return float(m.group(1)) + +def minutes(clock): + h, m = clock.split(":") + return int(h) * 60 + int(m) + +# ---------------------------------------------------------------- noise +def noise(): + doc = text("exposure_values.md") + lower, upper, limit = [table_value(doc, k) for k in ("Lower action value", "Upper action value", "Limit value")] + diary = rows("noise_diary.csv") + level = {} + if os.path.exists("task_levels.csv"): + for r in rows("task_levels.csv"): level[r["task"]] = float(r["laeq_db"]) + energy = {} # worker -> day -> sum of hours x 10^(L/10) + for r in diary: + if "duration_min" in r: hrs = float(r["duration_min"]) / 60 + else: hrs = (minutes(r["end"]) - minutes(r["start"])) / 60 + L = float(r["laeq_db"]) if "laeq_db" in r else level[r["task"]] + day = r.get("day", "day") + energy.setdefault(r["worker_id"], {}).setdefault(day, 0.0) + energy[r["worker_id"]][day] += hrs * 10 ** (L / 10) + def band(x): + if x > limit: return "over_limit" + if x >= upper: return "upper_action" + if x >= lower: return "lower_action" + return "below_lower_action" + weekly = "day" in diary[0] + planned = {} + if os.path.exists("planned_work.csv"): + for r in rows("planned_work.csv"): planned[r["worker_id"]] = r["planned_task"] + ans = {"workers": {}, "at_or_above_upper_action": []} + for w, days in energy.items(): + daily = {d: 10 * log10(e / 8) for d, e in days.items()} + if weekly: + value = 10 * log10(sum(10 ** (x / 10) for x in daily.values()) / 5) + loudest = sorted(daily, key=lambda d: daily[d])[-1] + out = {"daily_lex8h_db": {d: round(x, 1) for d, x in daily.items()}, "weekly_lex_db": round(value, 1), "loudest_day": loudest} + else: + value = daily["day"] + out = {"lex8h_db": round(value, 1)} + if w in planned: + allowed = 8 * 10 ** (limit / 10) # energy budget at the limit value + spare = allowed - days["day"] + out["extra_minutes"] = int(floor(spare / 10 ** (level[planned[w]] / 10) * 60)) if spare > 0 else 0 + out["band"] = band(value) + ans["workers"][w] = out + if value >= upper: ans["at_or_above_upper_action"].append(w) + return ans + +# ---------------------------------------------------------------- chemicals +def chemicals(): + oel, mass, group = {}, {}, {} + for r in rows("oel_table.csv"): + m = float(r["molar_mass_g_per_mol"]); v = float(r["oel_8h"]) + if r["oel_unit"] == "ppm": v = v * m / 24.45 + oel[r["substance"]] = v; mass[r["substance"]] = m; group[r["substance"]] = r["effect_group"] + info = {} + if os.path.exists("workers.csv"): + for r in rows("workers.csv"): info[r["worker_id"]] = (float(r["shift_min"]), r["unsampled_time"]) + acc = {} # (worker, substance) -> [sum C x t, sum t] + for r in rows("samples.csv"): + if r.get("sample_type", "personal") != "personal": continue + s = r["substance"] + if "concentration_mg_m3" in r: c = float(r["concentration_mg_m3"]) + else: + c = float(r["concentration"]) + if r["unit"] == "ppm": c = c * mass[s] / 24.45 + a = acc.setdefault((r["worker_id"], s), [0.0, 0.0]) + a[0] += c * float(r["duration_min"]); a[1] += float(r["duration_min"]) + per_worker = {} + for (w, s), (ct, t) in acc.items(): + shift, rule = info.get(w, (480.0, "zero")) + twa = ct / 480 if rule == "zero" else ct / t * shift / 480 + per_worker.setdefault(w, {})[s] = twa + multi = any(len(v) > 1 for v in per_worker.values()) + ans = {"workers": {}, "over_limit": []} + for w, subs in per_worker.items(): + if multi: + gi = {} + for s, twa in subs.items(): gi[group[s]] = gi.get(group[s], 0.0) + twa / oel[s] + ans["workers"][w] = {"substances": {s: {"twa_mg_m3": round(twa, 2), "exposure_index": round(twa / oel[s], 2)} for s, twa in subs.items()}, + "group_index": {g: round(v, 2) for g, v in gi.items()}} + worst = max(gi.values()) + else: + (s, twa), = subs.items() + ans["workers"][w] = {"twa_mg_m3": round(twa, 2), "twa_ppm": round(twa * 24.45 / mass[s], 2), "exposure_index": round(twa / oel[s], 2)} + worst = twa / oel[s] + if worst > 1: ans["over_limit"].append(w) + return ans + +# ---------------------------------------------------------------- vibration +def vibration(): + doc = text("vibration_values.md") + action, limit = table_value(doc, "Exposure action value"), table_value(doc, "Exposure limit value") + mag = {} + if os.path.exists("tools.csv"): + for r in rows("tools.csv"): + if "vibration_m_s2" in r: mag[r["tool_id"]] = float(r["vibration_m_s2"]) + else: mag[r["tool_id"]] = sqrt(float(r["ax_m_s2"]) ** 2 + float(r["ay_m_s2"]) ** 2 + float(r["az_m_s2"]) ** 2) + dose = {} # operator -> tool -> a^2 x hours + for r in rows("tool_use.csv"): + if "tool" in r: key, a, hrs = r["tool"], float(r["vibration_m_s2"]), float(r["trigger_time_min"]) / 60 + else: key, a, hrs = r["tool_id"], mag[r["tool_id"]], float(r["operations"]) * float(r["seconds_per_operation"]) / 3600 + d = dose.setdefault(r["operator_id"], {}) + d[key] = d.get(key, 0.0) + a * a * hrs + ans = {"operators": {}, "at_or_above_action": []} + for o, d in dose.items(): + A = sqrt(sum(d.values()) / 8) + out = {"a8_m_s2": round(A, 2), "band": "over_limit" if A > limit else "action_to_limit" if A >= action else "below_action"} + if mag: out["dominant_tool"] = sorted(d, key=lambda k: d[k])[-1] + ans["operators"][o] = out + if A >= action: ans["at_or_above_action"].append(o) + if mag: + ans["tools"] = {t: {"minutes_to_action": round(480 * (action / a) ** 2, 1), "minutes_to_limit": round(480 * (limit / a) ** 2, 1)} for t, a in mag.items()} + return ans + +# ---------------------------------------------------------------- incidents +def incidents(): + doc = text("definitions.md") + def factor(label): + m = re.search(re.escape(label) + r".*? x ([0-9,]+) / hours worked", doc) + return int(m.group(1).replace(",", "")) + per_f, per_s = factor("Frequency rate"), factor("Severity rate") + m = re.search(r"capped at (\d+) days", doc); cap = int(m.group(1)) if m else None + m = re.search(r"LTIFR is higher than ([0-9.]+?)\.?\s*$", doc, re.M); target = float(m.group(1)) if m else None + log, hrs = rows("incident_log.csv"), rows("hours_worked.csv") + years = sorted(set(r["month"][:4] for r in hrs)) + year = years[-1] + hours = {} + for r in hrs: + if r.get("workforce", "employees") != "employees": continue + k = (r["month"][:4], r.get("department", "site")) + hours[k] = hours.get(k, 0) + int(r["hours"]) + ltis = [r for r in log if r["type"] == "injury" and int(r["days_lost"]) >= 1 + and r.get("person_type", "employee") == "employee" and r.get("work_related", "yes") == "yes"] + def figures(y, dept=None): + mine = [r for r in ltis if r["date"][:4] == y and (dept is None or r["department"] == dept)] + days = sum(min(int(r["days_lost"]), cap) if cap else int(r["days_lost"]) for r in mine) + h = sum(v for (yy, dd), v in hours.items() if yy == y and (dept is None or dd == dept)) + return {"lti_count": len(mine), "days_lost": days, "hours_worked": h, "ltifr": len(mine) * per_f / h, "severity_rate": days * per_s / h} + def tidy(f): + g = dict(f); g["ltifr"] = round(f["ltifr"], 2); g["severity_rate"] = round(f["severity_rate"], 4); return g + ids = [r["incident_id"] for r in ltis if r["date"][:4] == year] + if "department" not in hrs[0]: + ans = tidy(figures(year)); ans["lti_ids"] = ids + return ans + depts = sorted(set(r["department"] for r in hrs)) + per_dept = {d: figures(year, d) for d in depts} + ans = {"departments": {d: tidy(f) for d, f in per_dept.items()}, "lti_ids": ids, + "above_target": [d for d in depts if per_dept[d]["ltifr"] > target]} + if len(years) == 1: ans["site"] = tidy(figures(year)) + else: + site = {y: figures(y) for y in years} + ans["site"] = {y: tidy(f) for y, f in site.items()} + ans["ltifr_change"] = round(site[year]["ltifr"] - site[years[0]]["ltifr"], 2) + return ans + +if os.path.exists("noise_diary.csv"): answer = noise() +elif os.path.exists("samples.csv"): answer = chemicals() +elif os.path.exists("tool_use.csv"): answer = vibration() +else: answer = incidents() +with open("answer.json", "w") as f: json.dump(answer, f, indent=1) diff --git a/envs/harris_matrix/__init__.py b/envs/harris_matrix/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/envs/harris_matrix/env.toml b/envs/harris_matrix/env.toml new file mode 100644 index 0000000000000000000000000000000000000000..38877ba43fc1d35361489b7213ddb0228fddd8e0 --- /dev/null +++ b/envs/harris_matrix/env.toml @@ -0,0 +1,7 @@ +name = "harris-matrix" +title = "Harris Matrix" +isced = "0222" +summary = "Work an excavation archive after the dig: order the contexts, reduce the Harris matrix, date deposits from finds and find impossible relations." +task_type = "stratigraphic analysis" +good_for = ["Reasoning over partial orders from tabular records", "Applying a written recording convention exactly", "Answers checked by a constraint validator"] +families = ["sequence", "reduction", "dating", "errors"] diff --git a/envs/harris_matrix/gen.py b/envs/harris_matrix/gen.py new file mode 100644 index 0000000000000000000000000000000000000000..f4bd42a9f8dac369354c3fe358eacc7636c0bd9a --- /dev/null +++ b/envs/harris_matrix/gen.py @@ -0,0 +1,547 @@ +"""Harris Matrix (ISCED-F 0222 History and archaeology). + +Post-excavation stratigraphy from a synthetic single-context record. Four task families: + sequence a full earliest-to-latest ordering of the contexts (not unique, validator-checked), plus levels, + the longest chain and the contexts with nothing earlier or later + reduction the reduced (Harris) matrix: which recorded relations are redundant, what lies directly beneath + each context, and how many lines the matrix has + dating terminus post quem for every context from the finds in and beneath it; at difficulty 3 also + intrusive and residual finds, independently dated contexts and terminus ante quem + errors a record with one or two impossible relations (cycles): the contexts on a cycle, the faulty rows, + and the sequence once they are removed + +Method: the Harris matrix and the laws of superposition and stratigraphical succession follow E. C. Harris, +Principles of Archaeological Stratigraphy (2nd ed., 1989): a matrix shows only the direct relations, so a +relation implied by others is left out (the transitive reduction of the order). Terminus post quem is the +date of the latest find in or beneath a deposit; terminus ante quem comes from a later, independently dated +context. The exact conventions used here (relation names, same-as groups, levels, redundancy, which finds +count) are written out in stratigraphy_rules.md, which ships with every task, so nothing rests on memory. + +This module builds a site as a graph of deposits ("units", each with one or more context numbers) and +computes every expected value from that graph. oracle.py starts again from the CSV files. +""" +from practice.core import Task, rng_for, to_csv, c_int, c_set, c_custom + +ENV = "harris-matrix" + +RULES = """# Stratigraphic recording rules + +These are the conventions of this site archive. Apply them exactly as written. + +## The record + +- `contexts.csv` has one row per context: a layer, a fill, a cut, a wall or another unit of stratigraphy, each with its own context number. +- `relations.csv` has one row per physical relation seen on site. Read a row as "`context_a` `relation` `context_b`". + +## What each relation says about time + +| relation | read as | the later context is | +|---|---|---| +| `overlies` | A lies on top of B | A | +| `cuts` | A is a cut dug through B | A | +| `fills` | A lies inside the cut B | A | +| `abuts` | A was laid or built up against B, which already stood | A | +| `underlies` | A lies beneath B | B | +| `cut by` | A is dug through by the cut B | B | +| `filled by` | A is a cut that has B inside it | B | +| `abutted by` | B was laid or built up against A | B | +| `same as` | A and B are one deposit recorded under two numbers | neither | + +So a fill is later than its cut, a cut is later than everything it cuts, and whatever overlies or abuts a context is later than it. The `type` of a context is a description only: work from the recorded relations. + +A physical relation is sometimes entered twice, for example as "A overlies B" on one sheet and "B underlies A" on the other. Both rows say the same thing. + +## Same-as groups + +`same as` works in both directions and in chains: if A is the same as B and B is the same as C, then A, B and C are all one deposit. The contexts joined in this way form a same-as group and are contemporary with each other. A context with no same-as record is a group of its own. Every relation recorded for one member of a group holds for all its members: if A is the same as B and A overlies C, then B is later than C too. + +## Earlier and later + +X is **stratigraphically earlier** than Y (and Y is **stratigraphically later** than X) if + +- a recorded relation makes some context of X's group earlier than some context of Y's group, or +- there is a context Z such that X is stratigraphically earlier than Z and Z is stratigraphically earlier than Y. + +Two contexts of different groups, neither of which is stratigraphically earlier than the other, are **unrelated**: the record does not say which came first. + +## Sequence, levels and chains + +- A **valid sequence** lists every context exactly once, earliest first, so that X stands before Y whenever X is stratigraphically earlier than Y, and so that the contexts of a same-as group stand next to each other. There is usually more than one valid sequence. +- The **level** of a context is 1 if no context is stratigraphically earlier than it. Otherwise it is one more than the highest level found among the contexts stratigraphically earlier than it. Contemporary contexts have the same level. +- The **longest chain** is the largest number of contexts that can be lined up so that each one is stratigraphically earlier than the next. + +## The reduced (Harris) matrix + +- The matrix has one box for each same-as group. +- A recorded relation that makes X earlier than Y is **redundant** if there is a context Z such that X is stratigraphically earlier than Z and Z is stratigraphically earlier than Y. The matrix does not draw it, because the route through Z already shows it. A `same as` row is never redundant. When one physical relation has been entered twice, the two rows are either both redundant or both not. +- The reduced matrix has a line from box P up to box Q when at least one recorded relation that is not redundant makes a context of P earlier than a context of Q. Two boxes are joined by at most one line, however many rows record the relation. +- X is **directly earlier** than Y when the reduced matrix has a line from X's box up to Y's box. + +## Dating + +- `finds.csv` lists the finds by context. `date_from` and `date_to` give the range of years (AD) in which an object of that kind was made. A find with no dates cannot be used for dating. +- If the finds table has a `flag` column: a find flagged `intrusive` got into the deposit after it had formed (down a burrow or a root hole, or through a later disturbance) and is ignored for dating. A find flagged `residual` is old material that was already lying about when the deposit formed. It was in the deposit from the start, so it counts like any other find. +- If the contexts table has a `documented_year` column: a context with a year there is dated independently of its finds (a building account, a recorded fire). It formed in that year. +- The **terminus post quem (TPQ)** of a context X is the earliest year in which X can have formed. A deposit cannot be older than the newest thing in it or beneath it, so the TPQ is the latest of these years: the `date_from` of every usable find in X, in a context of X's same-as group or in a context stratigraphically earlier than X; and the `documented_year` of X, of a context of X's same-as group or of a context stratigraphically earlier than X. If there is no such year, X has no TPQ. +- The **terminus ante quem (TAQ)** of a context X is the latest year in which X can have formed. It is the earliest `documented_year` among X, the contexts of X's same-as group and the contexts stratigraphically later than X. If there is no such year, X has no TAQ. Finds never give a TAQ, because an object can go into the ground long after it was made. + +## Faulty records + +A record is **consistent** if no context comes out stratigraphically earlier than itself. A context that does come out earlier than itself **lies on a cycle**: the record claims something impossible, and at least one of the rows involved is wrong. +""" + +FORWARD = {"overlies": "underlies", "cuts": "cut by", "fills": "filled by", "abuts": "abutted by"} + +# ---------------------------------------------------------------- the formulas, on a graph of units +# A site is n units (0 .. n-1) and a collection of pairs (e, l): unit e is directly recorded as earlier than unit l. +def earlier_sets(n, pairs): + """For each unit, the set of units stratigraphically earlier than it (the pairs must have no cycle).""" + below = [set() for _ in range(n)] + for e, l in pairs: below[l].add(e) + memo = {} + def anc(v): + if v not in memo: + s = set() + for p in below[v]: s.add(p); s |= anc(p) + memo[v] = s + return memo[v] + return [anc(v) for v in range(n)] + +def unit_levels(n, pairs): + """Level 1 for a unit with nothing earlier, else one more than the highest level among the earlier units.""" + anc = earlier_sets(n, pairs); lv = {} + for v in sorted(range(n), key=lambda v: len(anc[v])): # every earlier unit has a strictly smaller set + lv[v] = 1 + max([lv[u] for u in anc[v]] or [0]) + return [lv[v] for v in range(n)] + +def redundant_pairs(n, pairs): + """Recorded pairs (e, l) for which some third unit w has e earlier than w and w earlier than l.""" + anc = earlier_sets(n, pairs) + return set((e, l) for e, l in pairs if any(e in anc[w] and w in anc[l] for w in range(n))) + +def unrelated_count(n, pairs, sizes): + """Unordered pairs of contexts in different units with no order between them (sizes: contexts per unit).""" + anc = earlier_sets(n, pairs) + return sum(sizes[u] * sizes[v] for u in range(n) for v in range(u + 1, n) if u not in anc[v] and v not in anc[u]) + +def tpq_taq(n, pairs, find_years, doc_years): + """find_years: unit -> list of date_from of the usable finds; doc_years: unit -> documented year. + TPQ = latest such year in the unit or earlier units; TAQ = earliest documented year in the unit or later units.""" + anc = earlier_sets(n, pairs); tpq, taq = [], [] + for v in range(n): + ys = [y for u in sorted(anc[v] | {v}) for y in list(find_years.get(u, [])) + ([doc_years[u]] if u in doc_years else [])] + tpq.append(max(ys) if ys else None) + zs = [doc_years[u] for u in sorted(doc_years) if u == v or v in anc[u]] + taq.append(min(zs) if zs else None) + return tpq, taq + +# ---------------------------------------------------------------- the same notions on a raw record (used for faulty records) +def record_graph(contexts, rows): + """rows are (context_a, relation, context_b). Returns (group number of each context, number of groups, + one entry per row: None for a same-as row, else (earlier group, later group)).""" + parent = dict((c, c) for c in contexts) + def find(c): + while parent[c] != c: c = parent[c] + return c + for a, rel, b in rows: + if rel == "same as": + ra, rb = find(a), find(b) + if ra != rb: parent[max(ra, rb)] = min(ra, rb) + roots = sorted(set(find(c) for c in contexts)) + gid = dict((root, i) for i, root in enumerate(roots)) + group = dict((c, gid[find(c)]) for c in contexts) + pairs = [] + for a, rel, b in rows: + if rel == "same as": pairs.append(None) + elif rel in FORWARD: pairs.append((group[b], group[a])) + else: pairs.append((group[a], group[b])) + return group, len(roots), pairs + +def groups_on_cycle(n, pairs): + """Groups that come out stratigraphically earlier than themselves.""" + above = [set() for _ in range(n)] + for p in pairs: + if p is not None: above[p[0]].add(p[1]) + out = set() + for s in range(n): + seen, stack = set(), sorted(above[s]) + while stack: + x = stack.pop() + if x in seen: continue + seen.add(x); stack.extend(sorted(above[x] - seen)) + if s in seen: out.add(s) + return out + +def record_consistent(contexts, rows): + _, n, pairs = record_graph(contexts, rows) + return not groups_on_cycle(n, pairs) + +# ---------------------------------------------------------------- building a site +LAYERS = ["dark grey silty clay", "brown sandy silt", "compact yellow clay", "ash and charcoal spread", "mixed rubble in silt", + "dark garden soil", "orange-brown gravel", "green-stained silt", "crushed mortar spread", "dump of oyster shell and silt", + "burnt daub and charcoal", "light brown clay silt", "trampled grey silt"] +NATURAL = ["natural gravel", "natural brickearth", "natural clay"] +PITS = ["rubbish pit", "cess pit", "quarry pit", "post-pit", "robber trench", "ditch"] +FILLS = ["dark organic silt", "grey ashy silt", "brown silt with tile fragments", "redeposited gravel", "loose rubble"] +WALLS = ["ragstone and flint wall footing", "chalk-block wall", "brick wall in lime mortar", "mortared rubble foundation"] +SURFACES = ["beaten clay floor", "mortar floor", "cobbled yard surface", "gravel metalling", "tile-on-edge hearth"] + +def build_site(r, n_units, n_extra): + """Deposit a site event by event. Units come out in an order in which every unit is later than the units it + was built on. Returns (units, edges) with edges {(earlier, later): relation as recorded from the later context}.""" + units, edges, tops = [], {}, [] + def new(kind, desc, below): + units.append({"type": kind, "desc": desc}) + for b, label in below: edges[(b, len(units) - 1)] = label + return len(units) - 1 + def beneath(u): return sorted(e for (e, l) in edges if l == u) + for desc in r.sample(NATURAL, 1 if n_units < 11 else 2): tops.append(new("natural", desc, [])) + while len(units) < n_units: + left = n_units - len(units) + kind = r.choices(["layer", "pit", "wall", "surface", "seal"], weights=[4, 3, 2, 1.5, 2])[0] + soft = [t for t in tops if units[t]["type"] != "wall"] + if kind == "layer" or (kind in ("pit", "wall") and (left < 2 or not soft)) or (kind == "seal" and len(tops) < 2) or (kind == "surface" and not soft): + ps = r.sample(tops, 2 if len(tops) >= 2 and r.random() < 0.4 else 1) + u = new("layer", r.choice(LAYERS), [(p, "overlies") for p in ps]) + for p in ps: + if r.random() < 0.8: tops.remove(p) + tops.append(u) + elif kind == "pit": + p = r.choice(soft); below = [(p, "cuts")] + if beneath(p) and r.random() < 0.4: below.append((r.choice(beneath(p)), "cuts")) # dug through p into what lies under it + what = r.choice(PITS) + cut = new("cut", "cut of " + what, below) + f1 = new("fill", r.choice(FILLS) + ", fill of " + what, [(cut, "fills")]); top = f1 + if left >= 3 and r.random() < 0.5: + top = new("fill", r.choice(FILLS) + ", upper fill of " + what, [(f1, "overlies"), (cut, "fills")]) + tops.append(top) + elif kind == "wall": + p = r.choice(soft) + cut = new("cut", "construction cut for wall", [(p, "cuts")]) + w = new("wall", r.choice(WALLS), [(cut, "fills")]); tops.append(w) + if left >= 3 and r.random() < 0.6: + tops.append(new("fill", "backfill of construction cut", [(cut, "fills"), (w, "abuts")])) + elif kind == "surface": + below = [(p, "overlies") for p in r.sample(soft, 2 if len(soft) >= 2 and r.random() < 0.4 else 1)] + walls = [t for t in tops if units[t]["type"] == "wall"] + if walls: below.append((r.choice(walls), "abuts")) + u = new("surface", r.choice(SURFACES), below) + for p, label in below: + if label == "overlies": tops.remove(p) + tops.append(u) + else: + ps = r.sample(tops, min(len(tops), r.choice([2, 2, 3]))) + u = new("layer", r.choice(["demolition rubble", "levelling dump of mixed clay", "thick dark earth", "topsoil"]), [(p, "overlies") for p in ps]) + for p in ps: tops.remove(p) + tops.append(u) + n = len(units) + anc = earlier_sets(n, list(edges)) + spare = [(e, l) for l in range(n) for e in sorted(anc[l]) if (e, l) not in edges and units[e]["type"] != "cut"] + for e, l in r.sample(spare, min(n_extra, len(spare))): # contacts seen on site that the matrix will not need + edges[(e, l)] = "cuts" if units[l]["type"] == "cut" else "overlies" + return units, edges + +def write_record(r, units, edges, d, bad=(), protected=()): + """Give the units context numbers and write the relation rows. Difficulty 2 and 3 record some deposits under two + or three numbers (same-as groups); difficulty 3 also enters some rows from the other sheet (inverse wording) + and enters a few relations twice. `bad` lists extra, false pairs (earlier, later) to plant. + Returns (context rows, relation rows, list of the row ids of the planted rows).""" + n = len(units) + splits = {} + if d >= 2: + can = [u for u in range(n) if u not in protected and units[u]["type"] in ("layer", "surface", "wall", "natural") and sum(1 for p in edges if u in p) >= 2] + r.shuffle(can) + for i, u in enumerate(can[:1 if d == 2 and r.random() < 0.5 else 2]): splits[u] = 3 if (d == 3 and i == 0) else 2 + total = n + sum(k - 1 for k in splits.values()) + start = r.choice([100, 200, 300, 400, 500, 600]) + numbers = r.sample(range(start + 1, start + 3 * total), total) + ctx_rows, members, queue = [], [], [] + staff = r.sample(["AB", "CM", "DK", "EO", "JS", "LT", "MR", "NP"], 3) + for u in range(n): + ms = ["C%d" % numbers.pop() for _ in range(splits.get(u, 1))] + members.append(ms); q = list(ms); r.shuffle(q); queue.append(q) + trenches = r.sample(["T1", "T2", "T3"], len(ms)) if len(ms) > 1 else [r.choice(["T1", "T2", "T3"])] + for m, t in zip(ms, trenches): + ctx_rows.append({"context_id": m, "type": units[u]["type"], "description": units[u]["desc"], "trench": t, "recorded_by": r.choice(staff)}) + def pick(u): + return queue[u].pop() if queue[u] else r.choice(members[u]) + def row(e, l, label, flip): + a, b = pick(l), pick(e) + return [b, FORWARD[label], a] if flip else [a, label, b] + rel = [] + for (e, l), label in edges.items(): + flip = d == 3 and r.random() < 0.4 + rel.append(row(e, l, label, flip)) + if d == 3 and not bad and r.random() < 0.12: rel.append(row(e, l, label, not flip)) # the same relation from the other sheet + planted = [] + for e, l in bad: # truly e is earlier than l; the row claims the opposite + label = "cuts" if units[e]["type"] == "cut" else "overlies" + planted.append(row(l, e, label, d == 3 and r.random() < 0.4)); rel.append(planted[-1]) + for ms in members: + for a, b in zip(ms, ms[1:]): rel.append([a, "same as", b] if r.random() < 0.5 else [b, "same as", a]) + r.shuffle(rel); r.shuffle(ctx_rows) + rel_rows = [{"relation_id": "R%02d" % (i + 1), "context_a": x[0], "relation": x[1], "context_b": x[2]} for i, x in enumerate(rel)] + planted_ids = [rel_rows[i]["relation_id"] for i, x in enumerate(rel) if any(x is p for p in planted)] + return ctx_rows, rel_rows, members, planted_ids + +CTX_HEADER = ["context_id", "type", "description", "trench", "recorded_by"] +REL_HEADER = ["relation_id", "context_a", "relation", "context_b"] +SIZE = {1: (8, 9), 2: (12, 14), 3: (16, 18)} +EXTRA = {1: (1, 2), 2: (2, 3), 3: (3, 4)} + +def site_for(r, d): + return build_site(r, r.randint(*SIZE[d]), r.randint(*EXTRA[d])) + +def spread(members, per_unit): + """Give every context of a unit that unit's value.""" + return dict((m, per_unit[u]) for u, ms in enumerate(members) for m in ms) + +def record_note(d): + notes = [] + if d >= 2: notes.append("Some deposits were recorded under more than one context number (`same as`).") + if d == 3: notes.append("Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`).") + return (" " + " ".join(notes)) if notes else "" + +def order_checks(units, edges, members, base=""): + """Checks shared by the sequence and errors families: ends of the sequence, longest chain, levels.""" + n = len(units); pairs = list(edges); anc = earlier_sets(n, pairs); lv = unit_levels(n, pairs) + has_later = set(e for e, l in pairs) + checks = [c_set("nothing_earlier", [m for u in range(n) if not anc[u] for m in members[u]]), + c_set("nothing_later", [m for u in range(n) if u not in has_later for m in members[u]]), + c_int("longest_chain", max(lv))] + level = spread(members, lv) + return checks + [c_int("levels.%s" % m, level[m]) for m in sorted(level)] + +ORDER_KEYS = """- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted. +- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order). +- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order). +- `longest_chain`: the length of the longest chain, as an integer number of contexts. +- `levels`: an object giving the level of every context, as an integer.""" + +# ---------------------------------------------------------------- sequence +def gen_sequence(seed, d): + r = rng_for(ENV + "/sequence", seed, d) + while True: + units, edges = site_for(r, d) + if max(unit_levels(len(units), list(edges))) <= len(units) - 3: break # not a single file: several sequences are valid + ctx_rows, rel_rows, members, _ = write_record(r, units, edges, d) + ids = sorted(m for ms in members for m in ms) + checks = [c_custom("valid_sequence", {"contexts": ids, "relations": [[x["context_a"], x["relation"], x["context_b"]] for x in rel_rows]}, weight=3)] + checks += order_checks(units, edges, members) + extra = "" + if d == 3: + checks.append(c_int("unrelated_pairs", unrelated_count(len(units), list(edges), [len(ms) for ms in members]))) + extra = "\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once." + inst = """# Harris matrix: stratigraphic sequence + +`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (%d contexts).%s `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below. + +Work out the order in which the contexts formed. + +Write `answer.json` in this folder, a JSON object with: + +%s%s +""" % (len(ids), record_note(d), ORDER_KEYS, extra) + return Task(ENV, "sequence", seed, d, "Stratigraphic sequence of %d contexts" % len(ids), inst, + {"contexts.csv": to_csv(ctx_rows, CTX_HEADER), "relations.csv": to_csv(rel_rows, REL_HEADER), "stratigraphy_rules.md": RULES}, + checks, {"contexts": len(ids), "relations": len(rel_rows)}) + +# ---------------------------------------------------------------- reduction +def gen_reduction(seed, d): + r = rng_for(ENV + "/reduction", seed, d) + while True: + units, edges = site_for(r, d) + n = len(units); red = redundant_pairs(n, list(edges)) + if len(red) >= 2: break + ctx_rows, rel_rows, members, _ = write_record(r, units, edges, d) + where = dict((m, u) for u, ms in enumerate(members) for m in ms) + redundant_ids = [] + for x in rel_rows: + if x["relation"] == "same as": continue + a, b = where[x["context_a"]], where[x["context_b"]] + pair = (b, a) if x["relation"] in FORWARD else (a, b) + assert pair in edges + if pair in red: redundant_ids.append(x["relation_id"]) + kept = sorted(set(edges) - red) + checks = [c_set("redundant", redundant_ids, weight=2), c_int("reduced_lines", len(kept))] + for u in range(n): + under = sorted(m for e, l in kept if l == u for m in members[e]) + for m in members[u]: checks.append(c_set("directly_earlier.%s" % m, under)) + checks.sort(key=lambda c: c["path"]) + ids = sorted(where) + inst = """# Harris matrix: reducing the record + +`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (%d contexts, %d recorded relations).%s `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix. + +The site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it. + +Write `answer.json` in this folder, a JSON object with: + +- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order). +- `reduced_lines`: the number of lines in the reduced matrix, as an integer. +- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them. +""" % (len(ids), len(rel_rows), record_note(d)) + return Task(ENV, "reduction", seed, d, "Reduced matrix for %d contexts" % len(ids), inst, + {"contexts.csv": to_csv(ctx_rows, CTX_HEADER), "relations.csv": to_csv(rel_rows, REL_HEADER), "stratigraphy_rules.md": RULES}, + checks, {"contexts": len(ids), "relations": len(rel_rows), "redundant": len(redundant_ids)}) + +# ---------------------------------------------------------------- dating +DATED = [("copper alloy", "coin", (1, 12), (0, 40)), ("silver", "coin", (1, 8), (0, 30)), ("copper alloy", "jetton", (5, 30), (0, 40)), + ("ceramic", "pottery sherd, glazed jug", (40, 120), (5, 90)), ("ceramic", "pottery sherd, cooking pot", (60, 180), (10, 110)), + ("ceramic", "decorated floor tile", (30, 80), (5, 70)), ("glass", "vessel fragment", (40, 100), (5, 80))] +UNDATED = [("bone", "animal bone"), ("iron", "nail"), ("slag", "smithing slag"), ("shell", "oyster shell"), ("stone", "roof slate fragment"), ("ceramic", "abraded tile fragment")] + +def gen_dating(seed, d): + r = rng_for(ENV + "/dating", seed, d) + while True: + units, edges = build_site(r, r.randint(*{1: (8, 9), 2: (11, 13), 3: (13, 15)}[d]), r.randint(*EXTRA[d])) + n = len(units); pairs = list(edges); anc = earlier_sets(n, pairs) + year = [] + y0 = r.randint(900, 1500) + for u in range(n): # the true year each unit formed: later units are younger + year.append(max([year[e] for e, l in pairs if l == u] or [y0]) + (r.randint(8, 45) if units[u]["type"] != "natural" else 0)) + finds = [] # [unit, material, object, date_from, date_to, flag] + def add_find(u, kind, lag, flag=""): + lo = year[u] - lag + finds.append([u, kind[0], kind[1], lo, lo + r.randint(*kind[2]), flag]) + for u in range(n): + if units[u]["type"] in ("natural", "cut"): continue # nothing is found in the natural or in a cut itself + for _ in range(r.choices([0, 1, 2, 3], weights=[45, 30, 20, 5])[0]): + kind = r.choice(DATED); add_find(u, kind, r.randint(*kind[3])) + if d >= 2: + for _ in range(r.choice([0, 0, 1, 2])): finds.append([u, ] + list(r.choice(UNDATED)) + ["", "", ""]) + doc = {} + if d == 3: + usable = dict((u, [f[3] for f in finds if f[0] == u and f[3] != ""]) for u in range(n)) + before = tpq_taq(n, pairs, usable, {})[0] + hosts = [u for u in range(n) if units[u]["type"] not in ("natural", "cut")] + bare = [u for u in hosts if before[u] is None] + # residual finds: one of them, where possible, in a context that has nothing else to date it + for u in ([r.choice(bare)] if bare else []) + [r.choice(hosts)]: + add_find(u, r.choice(DATED[3:]), r.randint(150, 400), "residual") + for u in r.sample(hosts, 2): add_find(u, r.choice(DATED), -r.randint(60, 220), "intrusive") + mid = [u for u in hosts if anc[u] and any(u in anc[v] for v in range(n))] + for u in r.sample(mid, min(len(mid), r.choice([1, 2]))): doc[u] = year[u] + usable = dict((u, [f[3] for f in finds if f[0] == u and f[3] != "" and f[5] != "intrusive"]) for u in range(n)) + tpq, taq = tpq_taq(n, pairs, usable, doc) + own = [max(usable[u]) if usable[u] else None for u in range(n)] + inherited = sum(1 for u in range(n) if tpq[u] is not None and (own[u] is None or own[u] < tpq[u])) + if inherited < 2 or sum(1 for t in tpq if t is not None) < n // 2: continue + if d == 3: + naive = tpq_taq(n, pairs, dict((u, [f[3] for f in finds if f[0] == u and f[3] != ""]) for u in range(n)), doc)[0] + no_res = tpq_taq(n, pairs, dict((u, [f[3] for f in finds if f[0] == u and f[3] != "" and f[5] == ""]) for u in range(n)), doc)[0] + if not doc or naive == tpq or no_res == tpq or all(t is None for t in taq): continue # every rule must change something + break + ctx_rows, rel_rows, members, _ = write_record(r, units, edges, d) + if d == 3: + for row in ctx_rows: row["documented_year"] = "" + for u, y in doc.items(): + m = r.choice(members[u]) + for row in ctx_rows: + if row["context_id"] == m: row["documented_year"] = y + r.shuffle(finds) + find_rows = [] + for i, f in enumerate(finds): + row = {"find_id": "F%03d" % (i + 1), "context_id": r.choice(members[f[0]]), "material": f[1], "object": f[2], "date_from": f[3], "date_to": f[4], "quantity": r.choice([1, 1, 1, 2, 3, 5])} + if d == 3: row["flag"] = f[5] + find_rows.append(row) + t_ctx, a_ctx = spread(members, tpq), spread(members, taq) + ids = sorted(t_ctx) + checks = [c_int("tpq.%s" % m, t_ctx[m]) for m in ids if t_ctx[m] is not None] + checks.append(c_set("no_tpq", [m for m in ids if t_ctx[m] is None], weight=2)) + extra, also = "", "" + if d == 3: + checks += [c_int("taq.%s" % m, a_ctx[m]) for m in ids if a_ctx[m] is not None] + checks.append(c_set("no_taq", [m for m in ids if a_ctx[m] is None], weight=2)) + extra = """ +- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year. +- `no_taq`: list of the contexts that have no TAQ (any order).""" + also = " Some finds carry a flag, and some contexts have a documented year." + inst = """# Harris matrix: dating the sequence + +`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (%d contexts) and `finds.csv` lists the finds from each context.%s%s `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated. + +Date every context from the finds in it and beneath it. + +Write `answer.json` in this folder, a JSON object with: + +- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year. +- `no_tpq`: list of the contexts that have no TPQ (any order).%s +""" % (len(ids), record_note(d), also, extra) + header = ["find_id", "context_id", "material", "object", "date_from", "date_to", "quantity"] + (["flag"] if d == 3 else []) + return Task(ENV, "dating", seed, d, "Dating %d contexts from their finds" % len(ids), inst, + {"contexts.csv": to_csv(ctx_rows, CTX_HEADER + (["documented_year"] if d == 3 else [])), "relations.csv": to_csv(rel_rows, REL_HEADER), + "finds.csv": to_csv(find_rows, header), "stratigraphy_rules.md": RULES}, checks, {"contexts": len(ids), "finds": len(find_rows)}) + +# ---------------------------------------------------------------- errors +def classes_on_cycle(n, pairs): + """The groups on a cycle, split into knots: two groups are in one knot if each is earlier than the other.""" + above = [set() for _ in range(n)] + for p in pairs: + if p is not None: above[p[0]].add(p[1]) + reach = [] + for s in range(n): + seen, stack = set(), sorted(above[s]) + while stack: + x = stack.pop() + if x not in seen: seen.add(x); stack.extend(sorted(above[x] - seen)) + reach.append(seen) + knots = set(frozenset(v for v in range(n) if v in reach[u] and u in reach[v]) for u in range(n) if u in reach[u]) + return sorted(sorted(k) for k in knots) + +def gen_errors(seed, d): + r = rng_for(ENV + "/errors", seed, d) + k = 2 if d == 3 else 1 + # Construct edge-disjoint paths around each faulty reverse relation. Removing + # one legitimate row cannot repair a knot; the reverse row is the unique fix. + # Keep same-as aliases outside knots so deleting an alias cannot hide a fault. + n = {1: 8, 2: 12, 3: 16}[d] + units = [{"type": "natural" if i == 0 else "layer", "desc": r.choice(LAYERS)} for i in range(n)] + edges = {} + bad = [] + for start in range(0, 4 * k, 4): + for e, l in [(start, start+1), (start, start+2), (start+1, start+3), (start+2, start+3), (start, start+3)]: + edges[e, l] = "overlies" + if start: edges[start-1, start] = "overlies" + bad.append((start, start+3)) + for i in range(4*k, n): + edges[i-1, i] = "overlies" + if i > 4*k and r.random() < 0.5: edges[i-2, i] = "overlies" + ctx_rows, rel_rows, members, planted = write_record(r, units, edges, d, bad, protected=range(4*k)) + ids = sorted(m for ms in members for m in ms) + rows = [(x["context_a"], x["relation"], x["context_b"]) for x in rel_rows] + group, ng, gpairs = record_graph(ids, rows) + knots = classes_on_cycle(ng, gpairs) + on_cycle = set(g for kn in knots for g in kn) + clean = [[x["context_a"], x["relation"], x["context_b"]] for x in rel_rows if x["relation_id"] not in planted] + checks = [c_set("cycle_contexts", [c for c in ids if group[c] in on_cycle], weight=2), c_set("faulty_relations", planted, weight=2), + c_custom("valid_sequence", {"contexts": ids, "relations": clean}, weight=2)] + checks += order_checks(units, edges, members) + inst = """# Harris matrix: checking a record for impossible relations + +`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (%d contexts, %d recorded relations).%s `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below. + +The record is not consistent: %s wrong. There is exactly one way to make the record consistent by deleting %s, and no way to do it by deleting fewer. + +Write `answer.json` in this folder, a JSON object with: + +- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order). +- `faulty_relations`: list of the %s to delete. + +Then delete %s and give, for the corrected record: + +%s +""" % (len(ids), len(rel_rows), record_note(d), + "one recorded relation is" if k == 1 else "two recorded relations are", + "one row of `relations.csv`" if k == 1 else "two rows of `relations.csv`", + "one `relation_id`" if k == 1 else "two `relation_id`s", + "that row" if k == 1 else "those rows", ORDER_KEYS) + return Task(ENV, "errors", seed, d, "Impossible relations among %d contexts" % len(ids), inst, + {"contexts.csv": to_csv(ctx_rows, CTX_HEADER), "relations.csv": to_csv(rel_rows, REL_HEADER), "stratigraphy_rules.md": RULES}, + checks, {"contexts": len(ids), "relations": len(rel_rows), "faulty": k}) + +FAMILIES = {"sequence": gen_sequence, "reduction": gen_reduction, "dating": gen_dating, "errors": gen_errors} + +def generate(seed, difficulty, family=None): + fam = family or sorted(FAMILIES)[seed % len(FAMILIES)] + return FAMILIES[fam](seed, difficulty) diff --git a/envs/harris_matrix/oracle.py b/envs/harris_matrix/oracle.py new file mode 100644 index 0000000000000000000000000000000000000000..523b772f817d72a5f6a2232a9d87e15351141a39 --- /dev/null +++ b/envs/harris_matrix/oracle.py @@ -0,0 +1,74 @@ +"""Solve the archive from its files without generator or framework imports.""" +import csv, json, itertools +from pathlib import Path + +def read(name): + with open(name) as f: return list(csv.DictReader(f)) + +def graph(ids, rows): + groups=[{x} for x in ids] + for r in rows: + if r['relation']!='same as': continue + a=next(g for g in groups if r['context_a'] in g); b=next(g for g in groups if r['context_b'] in g) + if a is not b: a.update(b); groups.remove(b) + groups=sorted(groups,key=lambda g:min(g)); where={x:i for i,g in enumerate(groups) for x in g}; pairs=[] + for r in rows: + a,b=where[r['context_a']],where[r['context_b']] + pairs.append(None if r['relation']=='same as' else (b,a) if r['relation'] in ('overlies','cuts','fills','abuts') else (a,b)) + reach=[set() for _ in groups] + for pair in pairs: + if pair is not None: reach[pair[0]].add(pair[1]) + for k in range(len(groups)): + for i in range(len(groups)): + if k in reach[i]: reach[i].update(reach[k]) + return groups,where,pairs,reach + +def order(groups,reach): + remaining=set(range(len(groups))); levels={}; seq=[] + while remaining: + ready=sorted(i for i in remaining if not any(i in reach[j] for j in remaining)) + if not ready: raise ValueError('cycle') + for i in ready: + levels[i]=1+max([levels[j] for j in levels if i in reach[j]] or [0]); seq.extend(sorted(groups[i])) + remaining.difference_update(ready) + return {'sequence':seq,'levels':{x:levels[i] for i,g in enumerate(groups) for x in g},'longest_chain':max(levels.values()), + 'nothing_earlier':sorted(x for i,g in enumerate(groups) if not any(i in s for s in reach) for x in g), + 'nothing_later':sorted(x for i,g in enumerate(groups) if not reach[i] for x in g), + 'unrelated_pairs':sum(len(groups[i])*len(groups[j]) for i in range(len(groups)) for j in range(i+1,len(groups)) if j not in reach[i] and i not in reach[j])} + +def solve(): + contexts=read('contexts.csv'); ids=[r['context_id'] for r in contexts]; rows=read('relations.csv'); groups,where,pairs,reach=graph(ids,rows) + # Family can be recognised from files and properties: errors have cycles; + # reduction/sequence share files so emit all valid derived values. + cyclic=[i for i,s in enumerate(reach) if i in s]; out={} + if cyclic: + out['cycle_contexts']=sorted(x for i in cyclic for x in groups[i]); fixed=None + for n in (1,2): + for drop in itertools.combinations(range(len(rows)),n): + clean=[r for i,r in enumerate(rows) if i not in drop]; state=graph(ids,clean) + if not any(i in s for i,s in enumerate(state[3])): + out['faulty_relations']=[rows[i]['relation_id'] for i in drop]; fixed=state; break + if fixed is not None: break + groups,where,pairs,reach=fixed + out.update(order(groups,reach)); return out + out.update(order(groups,reach)) + redundant=set(p for p in pairs if p is not None and any(k!=p[1] and p[1] in reach[k] for k in reach[p[0]])) + kept=set(p for p in pairs if p is not None)-redundant + out.update(redundant=[r['relation_id'] for r,p in zip(rows,pairs) if p in redundant],reduced_lines=len(kept), + directly_earlier={x:sorted(y for a,b in kept if b==i for y in groups[a]) for i,g in enumerate(groups) for x in g}) + if Path('finds.csv').exists(): + dates={i:[] for i in range(len(groups))}; docs={i:[] for i in range(len(groups))} + for r in read('finds.csv'): + if r.get('date_from') and r.get('flag')!='intrusive': dates[where[r['context_id']]].append(int(r['date_from'])) + for r in contexts: + if r.get('documented_year'): docs[where[r['context_id']]].append(int(r['documented_year'])) + tpq={}; taq={} + for i,g in enumerate(groups): + lower=[v for j in range(len(groups)) if j==i or i in reach[j] for v in dates[j]+docs[j]] + upper=[v for j in reach[i]|{i} for v in docs[j]] + if lower: tpq.update({x:max(lower) for x in g}) + if upper: taq.update({x:min(upper) for x in g}) + out.update(tpq=tpq,taq=taq,no_tpq=sorted(set(ids)-set(tpq)),no_taq=sorted(set(ids)-set(taq))) + return out + +if __name__=='__main__': Path('answer.json').write_text(json.dumps(solve())) diff --git a/envs/harris_matrix/validators.py b/envs/harris_matrix/validators.py new file mode 100644 index 0000000000000000000000000000000000000000..7ec806b37487f119fd11468f6cc7bf78a635b946 --- /dev/null +++ b/envs/harris_matrix/validators.py @@ -0,0 +1,20 @@ +"""Validate a proposed sequence directly against all recorded constraints.""" +def valid_sequence(answer, args): + try: + sequence=answer['sequence']; contexts=args['contexts']; relations=args['relations'] + if not isinstance(sequence,list) or any(not isinstance(x,str) for x in sequence): return False + if len(sequence)!=len(contexts) or set(sequence)!=set(contexts): return False + position={x:i for i,x in enumerate(sequence)} + groups=[{x} for x in contexts] + for a,rel,b in relations: + if rel!='same as': continue + ga=next(g for g in groups if a in g); gb=next(g for g in groups if b in g) + if ga is not gb: ga.update(gb); groups.remove(gb) + bounds={x:(min(position[y] for y in g),max(position[y] for y in g)) for g in groups for x in g} + if any(max(position[x] for x in g)-min(position[x] for x in g)+1!=len(g) for g in groups): return False + for a,rel,b in relations: + if rel=='same as': continue + early,late=(b,a) if rel in ('overlies','cuts','fills','abuts') else (a,b) + if bounds[early][1]>=bounds[late][0]: return False + return True + except (KeyError,TypeError,ValueError,StopIteration): return False diff --git a/envs/life_table/__init__.py b/envs/life_table/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/envs/life_table/env.toml b/envs/life_table/env.toml new file mode 100644 index 0000000000000000000000000000000000000000..6f4c5a7edf17e2f61f903706c9340d09e9f4b90c --- /dev/null +++ b/envs/life_table/env.toml @@ -0,0 +1,7 @@ +name = "life-table" +title = "Life Table" +isced = "0314" +summary = "Do a demographer's core calculations from population registers: life tables, fertility rates, age-standardised death rates and age-structure indicators." +task_type = "demographic calculation" +good_for = ["Chained column-by-column calculations", "Applying a methods note exactly", "Aggregating and filtering register tables"] +families = ["life-table", "fertility", "standardisation", "age-structure"] diff --git a/envs/life_table/gen.py b/envs/life_table/gen.py new file mode 100644 index 0000000000000000000000000000000000000000..813d628fadcd350d38b978420ecfdcff708bb453 --- /dev/null +++ b/envs/life_table/gen.py @@ -0,0 +1,593 @@ +"""Life Table (ISCED-F 0314 Sociology and cultural studies; demography). + +Four task families, all from synthetic population registers: + life-table abridged period life table from population and deaths by age group + fertility age-specific fertility rates, TFR, GRR, mean age at childbearing, NRR + standardisation crude and directly age-standardised death rates, standardised rate ratios + age-structure dependency ratios, ageing index, median age from grouped data + +Methods and sources (every formula is also written into the task's `methods.md`) + Period life table: m = D / P; q = n*m / (1 + (n - a)*m); l(x+n) = l(x)*(1 - q); d = l*q; + L = n*l(x+n) + a*d; open interval q = 1 and L = l / m; T = sum of L from x upward; e = T / l. + S. H. Preston, P. Heuveline, M. Guillot, "Demography: Measuring and Modeling Population Processes" + (2001), ch. 3. The a values for age 0 and ages 1-4 vary between populations, so each task states them. + Fertility: ASFR = births / women; TFR = 5 * sum(ASFR); GRR from female births; mean age at + childbearing = sum(midpoint * ASFR) / sum(ASFR); NRR = sum(female ASFR * 5Lx / l0) (same book, ch. 5). + Births to mothers under 15 are counted with 15-19 and births at 50 or over with 45-49 (the usual + convention, e.g. in the Human Fertility Database and UN Demographic Yearbook tables). + Direct standardisation: sum(w * m) / sum(w) with a stated standard population (ch. 2). The standard + populations here are synthetic and are given in the task. + Dependency ratios with ages 0-14, 15-64, 65+ (UN and Eurostat definition); median of grouped data by + linear interpolation within the median age group. +""" +import math +from practice.core import Task, rng_for, to_csv, to_json, c_int, c_num, c_str, c_set, c_list + +ENV = "life-table" +TOL = "Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for." +AREAS = ["Aldermark", "Brinmoor", "Calderfell", "Dunholt", "Eskwater", "Farrowby", "Glenrath", "Hollinside"] + +def label(lo, hi): + return "%d+" % lo if hi is None else str(lo) if hi == lo else "%d-%d" % (lo, hi) + +# ---------------------------------------------------------------- formulas +def life_table(groups, a0, a14, radix=100000.0): + """groups: list of (start age, width n or None for the open interval, m) in age order. + Returns one dict per interval with x, n, m, a, q, l, d, L, T, e.""" + out, l = [], radix + for x, n, m in groups: + if n is None: + a, q = None, 1.0 + else: + a = a0 if (x == 0 and n == 1) else a14 if (x == 1 and n == 4) else n / 2.0 + q = n * m / (1.0 + (n - a) * m) + dx = l * q + big_l = l / m if n is None else n * (l - dx) + a * dx + out.append({"x": x, "n": n, "m": m, "a": a, "q": q, "l": l, "d": dx, "L": big_l}) + l -= dx + t = 0.0 + for row in reversed(out): + t += row["L"]; row["T"] = t; row["e"] = t / row["l"] + return out + +def fertility(women, births, female_births=None, share_female=None, big_l=None, lows=(15, 20, 25, 30, 35, 40, 45)): + """Lists by five-year age group. Returns asfr (per woman), tfr, grr, mac, nrr (None without big_l).""" + f = [b / float(w) for b, w in zip(births, women)] + tfr = 5.0 * sum(f) + mac = sum((lo + 2.5) * x for lo, x in zip(lows, f)) / sum(f) + nrr = None + if female_births is not None: + ff = [b / float(w) for b, w in zip(female_births, women)] + grr = 5.0 * sum(ff) + if big_l is not None: nrr = sum(x * l for x, l in zip(ff, big_l)) / 100000.0 + else: + grr = tfr * share_female + return {"asfr": f, "tfr": tfr, "grr": grr, "mac": mac, "nrr": nrr} + +def crude_rate(pop, deaths): + return 100000.0 * sum(deaths) / sum(pop) + +def standardised_rate(pop, deaths, standard): + """Directly standardised rate per 100000: the standard population's weighted mean of the age-specific rates.""" + return 100000.0 * sum(w * d / float(p) for p, d, w in zip(pop, deaths, standard)) / sum(standard) + +def age_structure(pop, lows): + """pop by age group with lower bounds `lows` (last group open). Returns the indicators as a dict.""" + young = sum(p for p, lo in zip(pop, lows) if lo < 15) + old = sum(p for p, lo in zip(pop, lows) if lo >= 65) + work = sum(pop) - young - old + return {"total": sum(pop), "young": 100.0 * young / work, "old": 100.0 * old / work, "dep": 100.0 * (young + old) / work, + "ageing": 100.0 * old / young, "s_young": 100.0 * young / sum(pop), "s_work": 100.0 * work / sum(pop), + "s_old": 100.0 * old / sum(pop), "median": grouped_median(pop, lows)} + +def grouped_median(pop, lows): + half, cum = sum(pop) / 2.0, 0 + for i, p in enumerate(pop): + if cum + p >= half: + return lows[i] + (half - cum) / p * (lows[i + 1] - lows[i]) # never the open group in generated data + cum += p + +# ---------------------------------------------------------------- life table +LT_METHODS = """# Methods: abridged period life table + +For each age interval starting at exact age x and n years wide: + +1. Death rate: m = deaths / population.%s +2. Probability of dying in the interval: q = n * m / (1 + (n - a) * m), where a is the average number of years lived in the interval by those who die in it. + - age 0: a = %s + - ages 1-4: a = %s + - every other closed interval: a = n / 2 + - the open interval (the last one, written like `%d+`): q = 1 +3. Survivors: l at age 0 is the radix, 100000. For the next interval, l(x + n) = l(x) * (1 - q). +4. Deaths in the table: d = l * q. +5. Person-years lived: L = n * l(x + n) + a * d. For the open interval, L = l / m. +6. T at age x is the sum of L for that interval and every older interval. +7. Life expectancy at exact age x: e = T / l. + +An age group written `5-9` covers exact ages 5 up to 10, so x = 5 and n = 5. The group `0` is the first year of life (n = 1) and `1-4` has n = 4. +""" + +def mortality(r): + m0 = r.uniform(0.003, 0.03); m1 = m0 * r.uniform(0.04, 0.12) + a, b, c = r.uniform(0.0001, 0.0006), r.uniform(3e-5, 8e-5), r.uniform(0.088, 0.1) + def m(x, n): + if x == 0: return m0 + if x == 1: return m1 + mid = x + (n / 2.0 if n else 5.0) + return a + b * math.exp(c * mid) + return m + +def gen_lt(seed, d): + r = rng_for(ENV + "/life-table", seed, d) + starts = [0, 1, 5, 15, 30, 45, 60, 75] if d == 1 else [0, 1] + list(range(5, 90, 5)) + widths = [b - a for a, b in zip(starts, starts[1:])] + [None] + labels = [label(x, None if n is None else x + n - 1) for x, n in zip(starts, widths)] + a0 = r.choice([0.1, 0.15, 0.2, 0.3]); a14 = r.choice([1.5, 1.6, 1.7]) + sexes = ["both"] if d == 1 else ["female", "male"] + mfun = mortality(r); male_factor = r.uniform(1.25, 1.6) + base = r.randint(4000, 60000); k = r.uniform(0.0, 0.018) + year = r.randint(2005, 2022); years = [year] if d < 3 else [year - 1, year, year + 1] + pop, deaths = {}, {} + for s in sexes: + for x, n, lab in zip(starts, widths, labels): + width = n if n else 6 + p = int(base * width * math.exp(-k * x) * r.uniform(0.85, 1.15) * (0.5 if len(sexes) == 2 else 1.0) * (1.25 if (s == "female" and x >= 75) else 1.0)) + rate = mfun(x, n) * (male_factor if s == "male" else 1.0) + pop[s, lab] = p + for y in years: deaths[s, lab, y] = max(1, int(round(p * rate * r.uniform(0.9, 1.1)))) + def table(which): + groups = [] + for x, n, lab in zip(starts, widths, labels): + p = sum(pop[s, lab] for s in which) + dth = sum(deaths[s, lab, y] for s in which for y in years) / float(len(years)) + groups.append((x, n, dth / p)) + return life_table(groups, a0, a14) + files = {"methods.md": LT_METHODS % ( + "" if d < 3 else " The deaths file covers %d calendar years and the population is the mid-period population, so use the average annual number of deaths: m = (total deaths over the years / %d) / population." % (len(years), len(years)), + a0, a14, starts[-1])} + checks = [] + if d == 1: + rows = [{"age_group": lab, "population": pop["both", lab], "deaths": deaths["both", lab, year]} for lab in labels] + files["population_deaths.csv"] = to_csv(rows, ["age_group", "population", "deaths"]) + t = table(["both"]) + for row in t: + key = "table.%d." % row["x"] + checks += [c_num(key + "mx_per_1000", 1000 * row["m"], 3), c_num(key + "qx", row["q"], 6), c_num(key + "lx", row["l"], 0)] + checks += [c_num("e0", t[0]["e"], 2), c_num("e60", [x for x in t if x["x"] == 60][0]["e"], 2)] + inst = """# Life table: one population + +`population_deaths.csv` gives the mid-year population and the deaths in %d by age group. Build the abridged period life table as described in `methods.md`. + +Write `answer.json` in this folder, a JSON object with: + +- `table`: object keyed by the starting age of each interval as a string (`"0"`, `"1"`, `"5"`, ...), one entry per age group. Each value has + - `mx_per_1000`: the death rate per 1000 population, 3 decimals. + - `qx`: the probability of dying in the interval, 6 decimals. + - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number. +- `e0`: life expectancy at birth in years, 2 decimals. +- `e60`: life expectancy at exact age 60, 2 decimals. + +%s +""" % (year, TOL) + elif d == 2: + rows = [{"area_code": "A%02d" % r.randint(1, 30), "age_group": lab, "sex": s, "population": pop[s, lab], "deaths": deaths[s, lab, year]} for s in sexes for lab in labels] + code = rows[0]["area_code"] + for row in rows: row["area_code"] = code + r.shuffle(rows) + files["population_deaths.csv"] = to_csv(rows, ["area_code", "age_group", "sex", "population", "deaths"]) + t = table(sexes) + for row in t: + checks += [c_num("table.%d.qx" % row["x"], row["q"], 6), c_num("table.%d.lx" % row["x"], row["l"], 0)] + checks += [c_num("e0", t[0]["e"], 2), c_num("e65", [x for x in t if x["x"] == 65][0]["e"], 2)] + inst = """# Life table: both sexes combined + +`population_deaths.csv` gives the mid-year population and the deaths in %d by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`. + +Write `answer.json` in this folder, a JSON object with: + +- `table`: object keyed by the starting age of each interval as a string (`"0"`, `"1"`, `"5"`, ..., `"85"`), one entry per age group. Each value has + - `qx`: the probability of dying in the interval, 6 decimals. + - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number. +- `e0`: life expectancy at birth in years, 2 decimals. +- `e65`: life expectancy at exact age 65, 2 decimals. + +%s +""" % (year, TOL) + else: + prow = [{"age_group": lab, "sex": s, "population": pop[s, lab]} for s in sexes for lab in labels] + drow = [{"year": y, "age_group": lab, "sex": s, "deaths": deaths[s, lab, y]} for s in sexes for lab in labels for y in years] + r.shuffle(prow); r.shuffle(drow) + files["population.csv"] = to_csv(prow, ["age_group", "sex", "population"]) + files["deaths.csv"] = to_csv(drow, ["year", "age_group", "sex", "deaths"]) + e0 = {} + for s in sexes: + t = dict((row["x"], row) for row in table([s])) + e0[s] = t[0]["e"] + checks += [c_num("%s.q0" % s, t[0]["q"], 6), c_num("%s.l15" % s, t[15]["l"], 0), c_num("%s.l60" % s, t[60]["l"], 0), c_num("%s.l65" % s, t[65]["l"], 0), + c_num("%s.q15_60" % s, 1 - t[60]["l"] / t[15]["l"], 5), c_num("%s.e0" % s, t[0]["e"], 2), c_num("%s.e15" % s, t[15]["e"], 2), c_num("%s.e65" % s, t[65]["e"], 2)] + checks.append(c_num("e0_gap", e0["female"] - e0["male"], 2)) + inst = """# Life table: women and men + +`population.csv` gives the mid-%d population by age group and sex. `deaths.csv` gives the deaths in %d, %d and %d by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`. + +Write `answer.json` in this folder, a JSON object with: + +- `female` and `male`: for each sex an object with + - `q0`: the probability of dying before exact age 1, 6 decimals. + - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number. + - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals. + - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals. +- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals. + +%s +""" % (year, years[0], years[1], years[2], TOL) + return Task(ENV, "life-table", seed, d, "Abridged life table, %d age groups" % len(labels), inst, files, checks, {"groups": len(labels)}) + +# ---------------------------------------------------------------- fertility +F_LOWS = [15, 20, 25, 30, 35, 40, 45] +F_LABELS = [label(x, x + 4) for x in F_LOWS] +SHAPES = [[0.08, 0.25, 0.27, 0.20, 0.12, 0.06, 0.02], [0.03, 0.15, 0.30, 0.28, 0.17, 0.06, 0.01], [0.01, 0.07, 0.22, 0.36, 0.25, 0.08, 0.01]] + +def f_methods(d): + s = """# Methods: fertility measures + +The reproductive ages are 15 to 49, in seven five-year age groups: 15-19, 20-24, 25-29, 30-34, 35-39, 40-44 and 45-49. + +1. Age-specific fertility rate: ASFR = births to mothers in the age group / mid-year number of women in the age group. It is usually shown per 1000 women. +2. Total fertility rate: TFR = 5 * (sum of the seven ASFRs, per woman). It is a number of children per woman. +3. Mean age at childbearing: sum of (midpoint * ASFR) / sum of ASFR over the seven groups. The midpoint of a group is its lower age plus 2.5 (17.5 for 15-19, and so on). +""" + if d == 1: s += "4. Gross reproduction rate: GRR = TFR * (share of births that are girls).\n" + elif d == 2: s += "4. Gross reproduction rate: GRR = TFR * (share of births that are girls). With a sex ratio at birth of b boys per 100 girls, that share is 100 / (100 + b).\n" + else: s += """4. Gross reproduction rate: GRR = 5 * (sum over the seven groups of female births / women). Use the girls born to each age group, not an overall share. +5. Net reproduction rate: NRR = sum over the seven groups of (female births / women) * L / 100000, where L is the person-years lived by women in that five-year age group in the female life table with radix 100000 (the `Lx` column). +""" + if d >= 2: s += """ +Conventions: + +- Births to mothers under 15 are counted with the 15-19 group, and births to mothers aged 50 or over with the 45-49 group. The denominators do not change: they are still the women aged 15-19 and 45-49. +- Women outside ages 15 to 49 are not used. +- For the whole county, add up the municipalities' births and women first, then compute the rates. +""" + return s + +def gen_fert(seed, d): + r = rng_for(ENV + "/fertility", seed, d) + munis = r.sample(AREAS, {1: 1, 2: 4, 3: 5}[d]) + while True: + shape = r.choice(SHAPES) + w = [x * r.uniform(0.85, 1.15) for x in shape] + tfr_target = r.uniform(1.2, 4.2 if shape is SHAPES[0] else 2.6) + f = [tfr_target * x / sum(w) / 5.0 for x in w] + women, births, fem, extra_w = {}, {}, {}, {} + for mu in munis: + size = r.randint(1500, 30000) + for i, lab in enumerate(F_LABELS): + wn = int(size * r.uniform(0.8, 1.2)) + b = int(round(wn * f[i] * r.uniform(0.9, 1.1))) + women[mu, lab] = wn; births[mu, lab] = b + fem[mu, lab] = int(round(b * r.uniform(0.47, 0.50))) + for lab in ("under 15", "50+"): + births[mu, lab] = r.randint(0, 5) if d >= 2 else 0 + fem[mu, lab] = r.randint(0, births[mu, lab]) + for lab in ("10-14", "50-54"): extra_w[mu, lab] = int(size * r.uniform(0.8, 1.2)) + tot_w = [sum(women[mu, lab] for mu in munis) for lab in F_LABELS] + def tot(src): + t = [sum(src[mu, lab] for mu in munis) for lab in F_LABELS] + t[0] += sum(src[mu, "under 15"] for mu in munis); t[-1] += sum(src[mu, "50+"] for mu in munis) + return t + tot_b, tot_f = tot(births), tot(fem) + big_l = None + if d == 3: + l15 = r.uniform(90000, 99300); h = r.uniform(0.0008, 0.004) + lt_rows = [] + for lo in [0, 1] + list(range(5, 90, 5)): + n = 1 if lo == 0 else 4 if lo == 1 else 5 + lx = l15 * math.exp(-h * (lo + n / 2.0 - 15)) if lo >= 15 else 100000 - (100000 - l15) * (0.85 + 0.15 * lo / 15.0) + lx *= math.exp(-max(0, lo - 60) ** 2 / 600.0) + lt_rows.append({"age_group": label(lo, None if lo == 85 else lo + n - 1), "Lx": int(round(n * lx)) if lo < 85 else int(round(4.5 * lx))}) + big_l = [row["Lx"] for row in lt_rows if row["age_group"] in F_LABELS] + if d == 1: share = round(r.uniform(0.482, 0.492), 3); res = fertility(tot_w, tot_b, share_female=share) + elif d == 2: srb = round(r.uniform(103.0, 107.5), 1); res = fertility(tot_w, tot_b, share_female=100.0 / (100.0 + srb)) + else: res = fertility(tot_w, tot_b, female_births=tot_f, big_l=big_l) + top = sorted(res["asfr"], reverse=True) + if (top[0] - top[1]) / top[0] >= 0.03: break + year = r.randint(2000, 2023) + files = {"methods.md": f_methods(d)} + if d == 1: + mu = munis[0] + files["women.csv"] = to_csv([{"age_group": lab, "women": women[mu, lab]} for lab in F_LABELS], ["age_group", "women"]) + files["births.csv"] = to_csv([{"age_of_mother": lab, "births": births[mu, lab]} for lab in F_LABELS], ["age_of_mother", "births"]) + files["registry.json"] = to_json({"area": mu, "year": year, "share_female_births": share}) + src = "`women.csv` gives the mid-year number of women by age group in %s in %d and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls." % (mu, year) + else: + wrows = [{"municipality": mu, "age_group": lab, "women": women[mu, lab]} for mu in munis for lab in F_LABELS] + wrows += [{"municipality": mu, "age_group": lab, "women": extra_w[mu, lab]} for mu in munis for lab in ("10-14", "50-54")] + r.shuffle(wrows) + files["women.csv"] = to_csv(wrows, ["municipality", "age_group", "women"]) + labs = ["under 15"] + F_LABELS + ["50+"] + if d == 2: + brows = [{"municipality": mu, "age_of_mother": lab, "births": births[mu, lab]} for mu in munis for lab in labs if births[mu, lab] > 0] + r.shuffle(brows) + files["births.csv"] = to_csv(brows, ["municipality", "age_of_mother", "births"]) + files["registry.json"] = to_json({"year": year, "boys_per_100_girls": srb}) + src = ("`women.csv` gives the mid-year number of women by municipality and age group in %d and `births.csv` the live births by municipality and age of mother, both in no particular order. " + "`registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all %d municipalities together).") % (year, len(munis)) + else: + brows = [] + for mu in munis: + for lab in labs: + if fem[mu, lab] > 0: brows.append({"municipality": mu, "age_of_mother": lab, "sex_of_child": "girl", "births": fem[mu, lab]}) + if births[mu, lab] - fem[mu, lab] > 0: brows.append({"municipality": mu, "age_of_mother": lab, "sex_of_child": "boy", "births": births[mu, lab] - fem[mu, lab]}) + r.shuffle(brows) + files["births.csv"] = to_csv(brows, ["municipality", "age_of_mother", "sex_of_child", "births"]) + files["female_life_table.csv"] = to_csv(lt_rows, ["age_group", "Lx"]) + src = ("`women.csv` gives the mid-year number of women by municipality and age group in %d and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. " + "`female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all %d municipalities together).") % (year, len(munis)) + checks = [c_int("total_births", sum(tot_b))] + for lab, x in zip(F_LABELS, res["asfr"]): checks.append(c_num("asfr_per_1000.%s" % lab, 1000 * x, 2)) + checks += [c_str("peak_age_group", F_LABELS[res["asfr"].index(max(res["asfr"]))]), c_num("tfr", res["tfr"], 3), c_num("grr", res["grr"], 3), + c_num("mean_age_at_childbearing", res["mac"], 2)] + more = "" + if d == 3: + checks.append(c_num("nrr", res["nrr"], 3)) + more = "\n- `nrr`: the net reproduction rate, 3 decimals." + inst = """# Fertility measures + +%s + +`methods.md` gives the definitions to use. + +Write `answer.json` in this folder, a JSON object with: + +- `total_births`: all live births, an integer. +- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals. +- `peak_age_group`: the age group with the highest rate. +- `tfr`: the total fertility rate in children per woman, 3 decimals. +- `grr`: the gross reproduction rate, 3 decimals. +- `mean_age_at_childbearing`: in years, 2 decimals.%s + +%s +""" % (src, more, TOL) + return Task(ENV, "fertility", seed, d, "Fertility measures, %d area(s)" % len(munis), inst, files, checks, {"areas": len(munis)}) + +# ---------------------------------------------------------------- standardisation +S_BANDS = {1: [(0, 14), (15, 44), (45, 64), (65, None)], + 2: [(0, 14), (15, 29), (30, 44), (45, 59), (60, 74), (75, None)]} +FINE = [(0, 4), (5, 14), (15, 24), (25, 29), (30, 39), (40, 44), (45, 54), (55, 59), (60, 69), (70, 74), (75, 84), (85, None)] +CAUSES = ["circulatory", "cancer", "respiratory", "external", "other"] + +S_METHODS = """# Methods: crude and age-standardised death rates + +All rates are deaths per 100000 population per year. + +1. Crude death rate of a region: 100000 * (deaths counted in the study, all ages together) / (whole population of the region). +2. Age-specific death rate in age band i: m_i = deaths in the band / population in the band (per person). +3. Directly age-standardised rate: 100000 * sum(w_i * m_i) / sum(w_i), where w_i is the standard population in band i from `standard_population.csv`. Use exactly that standard population. +4. Standardised rate ratio of a region: its standardised rate divided by the standardised rate of the reference region. The reference region has ratio 1. +%s""" + +def gen_std(seed, d): + r = rng_for(ENV + "/standardisation", seed, d) + std_bands = S_BANDS[min(d, 2)] + bands = FINE if d == 3 else std_bands + nreg = {1: 3, 2: 4, 3: 5}[d] + sexes = ["all"] if d == 1 else ["female", "male"] + def parent(b): + return [i for i, s in enumerate(std_bands) if b[0] >= s[0] and (s[1] is None or (b[1] is not None and b[1] <= s[1]))][0] + while True: + regions = r.sample(AREAS, nreg); ref = r.choice(regions) + cause = r.choice(CAUSES[:4]) if d >= 2 else None + ca, cb, cc = r.uniform(0.0002, 0.0006), r.uniform(3e-5, 7e-5), r.uniform(0.08, 0.095) + frac = dict(zip(CAUSES, [0.32, 0.26, 0.1, 0.07, 0.25])) + raw = [r.uniform(0.6, 1.0) * (b[1] - b[0] + 1 if b[1] else 12) * math.exp(-0.012 * b[0]) for b in std_bands] + standard = [int(round(100000 * x / sum(raw) / 50.0)) * 50 for x in raw] + standard[0] += 100000 - sum(standard) + pop, dth = {}, {} + for reg in regions: + k = r.uniform(-0.012, 0.03); mult = r.uniform(0.75, 1.3); size = r.randint(300, 6000) + for b in bands: + width = b[1] - b[0] + 1 if b[1] else 10 + mid = b[0] + width / 2.0 + rate = (ca + cb * math.exp(cc * mid)) * mult * r.uniform(0.9, 1.1) + for s in sexes: + p = int(size * width * math.exp(-k * mid) * r.uniform(0.9, 1.1) / len(sexes)) + pop[reg, b, s] = p + for c in (CAUSES if d >= 2 else ["all"]): + share = frac[c] * r.uniform(0.8, 1.2) if d >= 2 else 1.0 + dth[reg, b, s, c] = int(round(p * rate * share * (1.3 if s == "male" else 0.8 if s == "female" else 1.0))) + res = {} + for reg in regions: + p = [0] * len(std_bands); x = [0] * len(std_bands) + for b in bands: + i = parent(b) + p[i] += sum(pop[reg, b, s] for s in sexes) + x[i] += sum(dth[reg, b, s, cause or "all"] for s in sexes) + res[reg] = {"pop": sum(p), "deaths": sum(x), "crude": crude_rate(p, x), "std": standardised_rate(p, x, standard)} + if any(v["deaths"] < 30 for v in res.values()): continue + for reg in regions: res[reg]["srr"] = res[reg]["std"] / res[ref]["std"] + others = [g for g in regions if g != ref] + if any(abs(res[g]["srr"] - 1) < 0.02 or abs(res[g]["crude"] / res[ref]["crude"] - 1) < 0.02 for g in others): continue + ranking = sorted(regions, key=lambda g: -res[g]["std"]) + if any((res[a]["std"] - res[b]["std"]) / res[a]["std"] < 0.015 for a, b in zip(ranking, ranking[1:])): continue + flipped = sorted(g for g in others if (res[g]["srr"] > 1) != (res[g]["crude"] / res[ref]["crude"] > 1)) + if d == 3 and not flipped and r.random() < 0.5: continue + break + year = r.randint(2008, 2023) + files = {"standard_population.csv": to_csv([{"age_group": label(*b), "standard_population": w} for b, w in zip(std_bands, standard)], ["age_group", "standard_population"])} + note = "" + if d == 1: + rows = [{"region": reg, "age_group": label(*b), "population": pop[reg, b, "all"], "deaths": dth[reg, b, "all", "all"]} for reg in regions for b in bands] + r.shuffle(rows) + files["regions.csv"] = to_csv(rows, ["region", "age_group", "population", "deaths"]) + files["study.json"] = to_json({"year": year, "reference_region": ref}) + src = "`regions.csv` gives the mid-year population and the deaths in %d by region and age group, in no particular order." % year + else: + prow = [{"region": reg, "age_group": label(*b), "sex": s, "population": pop[reg, b, s]} for reg in regions for b in bands for s in sexes] + drow = [{"region": reg, "age_group": label(*b), "sex": s, "cause": c, "deaths": dth[reg, b, s, c]} for reg in regions for b in bands for s in sexes for c in CAUSES if dth[reg, b, s, c] > 0] + r.shuffle(prow); r.shuffle(drow) + files["population.csv"] = to_csv(prow, ["region", "age_group", "sex", "population"]) + files["deaths.csv"] = to_csv(drow, ["region", "age_group", "sex", "cause", "deaths"]) + files["study.json"] = to_json({"year": year, "cause": cause, "reference_region": ref}) + src = ("`population.csv` gives the mid-year population in %d by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. " + "The study is about deaths from the cause `%s` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths.") % (year, cause) + note = "\nThe population is always the whole population of the band (both sexes), whatever the cause of death studied.\n" + if d == 3: note += "\nThe regional files use narrower age bands than the standard population. Before computing age-specific rates, add the narrow bands together so that they match the bands of the standard population (for example `0-4` and `5-14` together make `0-14`).\n" + files["methods.md"] = S_METHODS % note + checks = [] + for reg in sorted(regions): + v = res[reg]; key = "regions.%s." % reg + checks += [c_int(key + "population", v["pop"]), c_int(key + "deaths", v["deaths"]), c_num(key + "crude_rate", v["crude"], 1), + c_num(key + "standardised_rate", v["std"], 1), c_num(key + "srr", v["srr"], 3)] + more = "" + if d == 3: + checks += [c_list("ranking", ranking, weight=2), c_set("reversed", flipped, weight=2)] + more = """ +- `ranking`: list of all regions from the highest standardised rate to the lowest. +- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).""" + inst = """# Age-standardised death rates + +%s `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is %s (also in `study.json`). + +Write `answer.json` in this folder, a JSON object with: + +- `regions`: object keyed by region. Each value has + - `population`: the region's whole population, an integer. + - `deaths`: the deaths counted in the study, an integer. + - `crude_rate`: crude death rate per 100000, 1 decimal. + - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal. + - `srr`: standardised rate ratio against the reference region, 3 decimals.%s + +%s +""" % (src, ref, more, TOL) + return Task(ENV, "standardisation", seed, d, "Standardised death rates, %d regions" % nreg, inst, files, checks, {"regions": nreg}) + +# ---------------------------------------------------------------- age structure +A_LOWS = list(range(0, 95, 5)) +A_LABELS = [label(x, None if x == 90 else x + 4) for x in A_LOWS] +A_METHODS = """# Methods: age-structure indicators + +Three broad age groups: children 0-14, working age 15-64, older people 65 and over. + +- Young-age dependency ratio = 100 * (population 0-14) / (population 15-64). +- Old-age dependency ratio = 100 * (population 65+) / (population 15-64). +- Total dependency ratio = young-age ratio + old-age ratio. +- Ageing index = 100 * (population 65+) / (population 0-14). +- Sex ratio = 100 * males / females (males per 100 females). +- Median age, from grouped data: let N be the total population. Find the age group in which the cumulative population first reaches N / 2. Then + + median = L + (N / 2 - C) / f * w + + where L is the lower age limit of that group, C the population in all younger groups, f the population in that group and w its width in years (5 for a group such as 30-34, which covers exact ages 30 up to 35). +- For a combination of areas (or of both sexes), add the populations age group by age group first and compute the indicator from the sums. Do not average the areas' indicators. +""" + +def area_pop(r, size): + b, peak, tau, yf = r.uniform(0, 0.8), r.uniform(25, 55), r.uniform(9, 18), r.uniform(0.55, 1.4) + out = {} + for lo in A_LOWS: + mid = lo + 2.5 + w = (1 + b * math.exp(-((mid - peak) / 12.0) ** 2)) * math.exp(-max(0.0, mid - 60) / tau) * (yf if lo < 15 else 1.0) + fem_extra = 1.0 + max(0, lo - 60) * 0.012 + out[lo, "female"] = int(size * w * r.uniform(0.9, 1.1) * fem_extra) + out[lo, "male"] = int(size * w * r.uniform(0.9, 1.1) * 1.03) + return out + +def gen_age(seed, d): + r = rng_for(ENV + "/age-structure", seed, d) + names = r.sample(AREAS, {1: 1, 2: 1, 3: 5}[d]) + while True: + pops = dict((a, area_pop(r, r.randint(300, 9000))) for a in names) + def ind(areas, sexes=("female", "male"), lo_min=0): + return age_structure([sum(pops[a][lo, s] for a in areas for s in sexes) for lo in A_LOWS], A_LOWS) + per = dict((a, ind([a])) for a in names); comb = ind(names) + if d < 3: break + order = sorted(names, key=lambda a: -per[a]["median"]) + if per[order[0]]["median"] - per[order[1]]["median"] < 0.3: continue + if any(abs(per[a]["old"] - comb["old"]) < 0.5 for a in names): continue + break + files = {"methods.md": A_METHODS} + year = r.randint(2010, 2024) + c = comb + if d == 1: + a = names[0] + files["population.csv"] = to_csv([{"age_group": lab, "population": pops[a][lo, "female"] + pops[a][lo, "male"]} for lo, lab in zip(A_LOWS, A_LABELS)], ["age_group", "population"]) + checks = [c_int("total_population", c["total"]), c_num("share_0_14_percent", c["s_young"], 2), c_num("share_15_64_percent", c["s_work"], 2), + c_num("share_65_plus_percent", c["s_old"], 2), c_num("young_dependency_ratio", c["young"], 2), c_num("old_dependency_ratio", c["old"], 2), + c_num("total_dependency_ratio", c["dep"], 2), c_num("ageing_index", c["ageing"], 2)] + inst = """# Age structure: one municipality + +`population.csv` gives the population of %s at the end of %d in five-year age groups. `methods.md` gives the definitions to use. + +Write `answer.json` in this folder, a JSON object with: + +- `total_population`: an integer. +- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals. +- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals. +- `ageing_index`: 2 decimals. + +%s +""" % (a, year, TOL) + elif d == 2: + a = names[0] + rows = [{"age_group": lab, "sex": s, "population": pops[a][lo, s]} for lo, lab in zip(A_LOWS, A_LABELS) for s in ("female", "male")] + r.shuffle(rows) + files["population.csv"] = to_csv(rows, ["age_group", "sex", "population"]) + fem, mal = ind(names, ("female",)), ind(names, ("male",)) + old_f = sum(pops[a][lo, "female"] for lo in A_LOWS if lo >= 65); old_m = sum(pops[a][lo, "male"] for lo in A_LOWS if lo >= 65) + checks = [c_int("total_population", c["total"]), c_num("young_dependency_ratio", c["young"], 2), c_num("old_dependency_ratio", c["old"], 2), + c_num("total_dependency_ratio", c["dep"], 2), c_num("ageing_index", c["ageing"], 2), + c_num("sex_ratio", 100.0 * mal["total"] / fem["total"], 2), c_num("sex_ratio_65_plus", 100.0 * old_m / old_f, 2), + c_num("median_age", c["median"], 2), c_num("median_age_female", fem["median"], 2), c_num("median_age_male", mal["median"], 2)] + inst = """# Age structure: one municipality by sex + +`population.csv` gives the population of %s at the end of %d by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. + +Write `answer.json` in this folder, a JSON object with: + +- `total_population`: both sexes, an integer. +- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals. +- `ageing_index`: both sexes together, 2 decimals. +- `sex_ratio`: males per 100 females in the whole population, 2 decimals. +- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals. +- `median_age`: median age of the whole population in years, 2 decimals. +- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals. + +%s +""" % (a, year, TOL) + else: + rows = [{"municipality": a, "age_group": lab, "sex": s, "population": pops[a][lo, s]} for a in names for lo, lab in zip(A_LOWS, A_LABELS) for s in ("female", "male")] + r.shuffle(rows) + files["population.csv"] = to_csv(rows, ["municipality", "age_group", "sex", "population"]) + checks = [] + for a in sorted(names): + v = per[a]; key = "areas.%s." % a + checks += [c_int(key + "population", v["total"]), c_num(key + "young_dependency_ratio", v["young"], 2), c_num(key + "old_dependency_ratio", v["old"], 2), + c_num(key + "ageing_index", v["ageing"], 2), c_num(key + "median_age", v["median"], 2)] + checks += [c_int("county.population", c["total"]), c_num("county.young_dependency_ratio", c["young"], 2), c_num("county.old_dependency_ratio", c["old"], 2), + c_num("county.ageing_index", c["ageing"], 2), c_num("county.median_age", c["median"], 2), + c_str("oldest_area", order[0]), c_set("above_county_old_dependency", sorted(a for a in names if per[a]["old"] > c["old"]), weight=2)] + inst = """# Age structure: a county and its municipalities + +`population.csv` gives the population of the %d municipalities of a county at the end of %d by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together. + +Write `answer.json` in this folder, a JSON object with: + +- `areas`: object keyed by municipality. Each value has + - `population`: an integer. + - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals. + - `ageing_index`: 2 decimals. + - `median_age`: in years, 2 decimals. +- `county`: the same five keys for the county as a whole (all municipalities together). +- `oldest_area`: the municipality with the highest median age. +- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order). + +%s +""" % (len(names), year, TOL) + return Task(ENV, "age-structure", seed, d, "Age structure, %d area(s)" % len(names), inst, files, checks, {"areas": len(names)}) + +FAMILIES = {"life-table": gen_lt, "fertility": gen_fert, "standardisation": gen_std, "age-structure": gen_age} + +def generate(seed, difficulty, family=None): + fam = family or sorted(FAMILIES)[seed % len(FAMILIES)] + return FAMILIES[fam](seed, difficulty) diff --git a/envs/life_table/oracle.py b/envs/life_table/oracle.py new file mode 100644 index 0000000000000000000000000000000000000000..e493a48552d3ca5046a13cec486d3c7304be48bb --- /dev/null +++ b/envs/life_table/oracle.py @@ -0,0 +1,188 @@ +#!/usr/bin/env python3 +"""Reference solution for Life Table. Works only from the files in the current directory.""" +import csv, json, os, re + +def rows(name): + with open(name, newline="") as f: return list(csv.DictReader(f)) + +def bounds(lab): + """'0' -> (0, 0); '5-9' -> (5, 9); '85+' -> (85, None).""" + lab = lab.strip() + if lab.endswith("+"): return int(lab[:-1]), None + if "-" in lab: + a, b = lab.split("-"); return int(a), int(b) + return int(lab), int(lab) + +# ------------------------------------------------------------ life table +def build_table(pop, deaths, a0, a14): + """pop, deaths: dicts keyed by age-group label. Returns {start age: row}.""" + out, lx = {}, 100000.0 + order = sorted(pop, key=lambda g: bounds(g)[0]) + seq = [] + for g in order: + lo, hi = bounds(g) + m = deaths[g] / float(pop[g]) + if hi is None: + row = {"x": lo, "m": m, "q": 1.0, "l": lx, "L": lx / m} + else: + n = hi - lo + 1 + a = a0 if g == "0" else a14 if g == "1-4" else n / 2.0 + q = n * m / (1 + (n - a) * m) + nxt = lx * (1 - q) + row = {"x": lo, "m": m, "q": q, "l": lx, "L": a * lx + (n - a) * nxt} # same as n*l(x+n) + a*d + lx = nxt + seq.append(row) + for i, row in enumerate(seq): + row["T"] = sum(r["L"] for r in seq[i:]); row["e"] = row["T"] / row["l"] + out[row["x"]] = row + return out + +def life_table(): + text = open("methods.md").read() + a0 = float(re.search(r"age 0: a = ([0-9.]+)", text).group(1)) + a14 = float(re.search(r"ages 1-4: a = ([0-9.]+)", text).group(1)) + if os.path.exists("population_deaths.csv"): + data = rows("population_deaths.csv") + pop, dth = {}, {} + for r in data: + pop[r["age_group"]] = pop.get(r["age_group"], 0) + int(r["population"]) + dth[r["age_group"]] = dth.get(r["age_group"], 0) + int(r["deaths"]) + t = build_table(pop, dth, a0, a14) + ans = {"table": {}, "e0": round(t[0]["e"], 2)} + for x, row in t.items(): + ans["table"][str(x)] = {"mx_per_1000": round(1000 * row["m"], 3), "qx": round(row["q"], 6), "lx": round(row["l"])} + for x in (60, 65): + if x in t: ans["e%d" % x] = round(t[x]["e"], 2) + return ans + drows = rows("deaths.csv") + nyears = len(set(r["year"] for r in drows)) + ans = {} + for sex in ("female", "male"): + pop = dict((r["age_group"], int(r["population"])) for r in rows("population.csv") if r["sex"] == sex) + dth = {} + for r in drows: + if r["sex"] == sex: dth[r["age_group"]] = dth.get(r["age_group"], 0.0) + int(r["deaths"]) / float(nyears) + t = build_table(pop, dth, a0, a14) + ans[sex] = {"q0": round(t[0]["q"], 6), "l15": round(t[15]["l"]), "l60": round(t[60]["l"]), "l65": round(t[65]["l"]), + "q15_60": round(1 - t[60]["l"] / t[15]["l"], 5), "e0": round(t[0]["e"], 2), "e15": round(t[15]["e"], 2), "e65": round(t[65]["e"], 2)} + ans[sex]["_e0"] = t[0]["e"] + ans["e0_gap"] = round(ans["female"].pop("_e0") - ans["male"].pop("_e0"), 2) + return ans + +# ------------------------------------------------------------ fertility +GROUPS = ["15-19", "20-24", "25-29", "30-34", "35-39", "40-44", "45-49"] + +def fertility(): + women = dict((g, 0) for g in GROUPS) + for r in rows("women.csv"): + if r["age_group"] in women: women[r["age_group"]] += int(r["women"]) + births = dict((g, 0) for g in GROUPS); girls = dict((g, 0) for g in GROUPS) + by_sex = False + for r in rows("births.csv"): + g = r["age_of_mother"].strip() + if g == "under 15": g = "15-19" + elif g == "50+": g = "45-49" + births[g] += int(r["births"]) + if "sex_of_child" in r: + by_sex = True + if r["sex_of_child"] == "girl": girls[g] += int(r["births"]) + rate = dict((g, births[g] / float(women[g])) for g in GROUPS) + tfr = 5 * sum(rate.values()) + ans = {"total_births": sum(births.values()), "asfr_per_1000": dict((g, round(1000 * rate[g], 2)) for g in GROUPS), + "peak_age_group": max(GROUPS, key=lambda g: rate[g]), "tfr": round(tfr, 3), + "mean_age_at_childbearing": round(sum((int(g[:2]) + 2.5) * rate[g] for g in GROUPS) / sum(rate.values()), 2)} + if by_sex: + ans["grr"] = round(5 * sum(girls[g] / float(women[g]) for g in GROUPS), 3) + big_l = dict((r["age_group"], float(r["Lx"])) for r in rows("female_life_table.csv")) + ans["nrr"] = round(sum(girls[g] / float(women[g]) * big_l[g] for g in GROUPS) / 100000.0, 3) + else: + reg = json.load(open("registry.json")) + share = reg["share_female_births"] if "share_female_births" in reg else 100.0 / (100.0 + reg["boys_per_100_girls"]) + ans["grr"] = round(tfr * share, 3) + return ans + +# ------------------------------------------------------------ standardisation +def standardisation(): + study = json.load(open("study.json")) + std = [(bounds(r["age_group"]), float(r["standard_population"])) for r in rows("standard_population.csv")] + def band(lab): + lo, hi = bounds(lab) + for i, ((slo, shi), _) in enumerate(std): + if lo >= slo and (shi is None or lo <= shi): return i + pop, dth = {}, {} + if os.path.exists("regions.csv"): + for r in rows("regions.csv"): + k = (r["region"], band(r["age_group"])) + pop[k] = pop.get(k, 0) + int(r["population"]); dth[k] = dth.get(k, 0) + int(r["deaths"]) + else: + for r in rows("population.csv"): + k = (r["region"], band(r["age_group"])); pop[k] = pop.get(k, 0) + int(r["population"]) + for r in rows("deaths.csv"): + if r["cause"] != study["cause"]: continue + k = (r["region"], band(r["age_group"])); dth[k] = dth.get(k, 0) + int(r["deaths"]) + regions = sorted(set(k[0] for k in pop)) + wsum = sum(w for _, w in std) + res = {} + for g in regions: + p = sum(pop[g, i] for i in range(len(std))); x = sum(dth.get((g, i), 0) for i in range(len(std))) + dsr = sum(w * dth.get((g, i), 0) / float(pop[g, i]) for i, (_, w) in enumerate(std)) / wsum * 100000 + res[g] = {"population": p, "deaths": x, "crude": 100000.0 * x / p, "dsr": dsr} + ref = study["reference_region"] + ans = {"regions": {}} + for g in regions: + ans["regions"][g] = {"population": res[g]["population"], "deaths": res[g]["deaths"], "crude_rate": round(res[g]["crude"], 1), + "standardised_rate": round(res[g]["dsr"], 1), "srr": round(res[g]["dsr"] / res[ref]["dsr"], 3)} + ans["ranking"] = sorted(regions, key=lambda g: res[g]["dsr"], reverse=True) + ans["reversed"] = [g for g in regions if g != ref and (res[g]["crude"] > res[ref]["crude"]) != (res[g]["dsr"] > res[ref]["dsr"])] + return ans + +# ------------------------------------------------------------ age structure +def indicators(by_age): + """by_age: {lower age limit: population} in five-year groups, the last one open.""" + lows = sorted(by_age) + total = sum(by_age.values()) + young = sum(v for lo, v in by_age.items() if lo <= 10) + old = sum(v for lo, v in by_age.items() if lo >= 65) + work = total - young - old + cum, median = 0, None + for i, lo in enumerate(lows): + if cum + by_age[lo] >= total / 2.0: + median = lo + (total / 2.0 - cum) / by_age[lo] * (lows[i + 1] - lo); break + cum += by_age[lo] + return {"population": total, "young_dependency_ratio": round(100.0 * young / work, 2), "old_dependency_ratio": round(100.0 * old / work, 2), + "total_dependency_ratio": round(100.0 * young / work + 100.0 * old / work, 2), "ageing_index": round(100.0 * old / young, 2), + "median_age": round(median, 2), "_old": 100.0 * old / work, "_median": median, "_parts": (young, work, old)} + +def age_structure(): + data = rows("population.csv") + def collect(keep): + out = {} + for r in data: + if keep(r): + lo = bounds(r["age_group"])[0]; out[lo] = out.get(lo, 0) + int(r["population"]) + return out + def public(d): return dict((k, v) for k, v in d.items() if not k.startswith("_")) + whole = indicators(collect(lambda r: True)) + if "municipality" in data[0]: + names = sorted(set(r["municipality"] for r in data)) + per = dict((a, indicators(collect(lambda r, a=a: r["municipality"] == a))) for a in names) + ans = {"areas": dict((a, public(per[a])) for a in names), "county": public(whole), + "oldest_area": max(names, key=lambda a: per[a]["_median"]), + "above_county_old_dependency": [a for a in names if per[a]["_old"] > whole["_old"]]} + return ans + ans = public(whole) + young, work, old = whole["_parts"] + ans["total_population"] = ans.pop("population") + ans.update(share_0_14_percent=round(100.0 * young / ans["total_population"], 2), share_15_64_percent=round(100.0 * work / ans["total_population"], 2), + share_65_plus_percent=round(100.0 * old / ans["total_population"], 2)) + if "sex" in data[0]: + f = indicators(collect(lambda r: r["sex"] == "female")); m = indicators(collect(lambda r: r["sex"] == "male")) + ans.update(sex_ratio=round(100.0 * m["population"] / f["population"], 2), sex_ratio_65_plus=round(100.0 * m["_parts"][2] / f["_parts"][2], 2), + median_age_female=f["median_age"], median_age_male=m["median_age"]) + return ans + +if os.path.exists("women.csv"): answer = fertility() +elif os.path.exists("standard_population.csv"): answer = standardisation() +elif os.path.exists("population_deaths.csv") or os.path.exists("deaths.csv"): answer = life_table() +else: answer = age_structure() +with open("answer.json", "w") as f: json.dump(answer, f, indent=1) diff --git a/envs/means_test/__init__.py b/envs/means_test/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/envs/means_test/env.toml b/envs/means_test/env.toml new file mode 100644 index 0000000000000000000000000000000000000000..587fcd7f0c95766e1dbb04d803e2ed1280e4d81b --- /dev/null +++ b/envs/means_test/env.toml @@ -0,0 +1,7 @@ +name = "means-test" +title = "Means Test" +isced = "0923" +summary = "Apply a written (fictional) benefit regulation to household case files: entitlement, mid-month changes, overpayments and review of past decisions." +task_type = "benefit assessment" +good_for = ["Applying a rule document to case files", "Multi-step money arithmetic with caps and disregards", "Auditing earlier decisions"] +families = ["entitlement", "change", "overpayment", "review"] diff --git a/envs/means_test/gen.py b/envs/means_test/gen.py new file mode 100644 index 0000000000000000000000000000000000000000..b64fc3eb483832a5960f4191a394e63484be71f5 --- /dev/null +++ b/envs/means_test/gen.py @@ -0,0 +1,533 @@ +"""Means Test (ISCED-F 0923 Social work and counselling). + +A caseworker applies a written benefit regulation to household case files. The municipality +(Eskermark), its Local Support Ordinance, the currency (florins) and every rate are invented for these +tasks and are shipped with each task as `regulation.md`; nothing is taken from a real scheme. The +general shape (a norm by household composition, reasonable housing cost with a cap, income after an +earnings disregard, an asset exemption, sanctions, proration by days, recovery of overpayments) is +the common shape of last-resort income support. + +Four task families: + entitlement assess each household: norm, countable income, housing allowance, benefit + change a change of circumstances during the month: periods, days and proration + overpayment a backdated change: correct benefit per month, total overpayment, recovery plan + review check a batch of earlier decisions, find the wrong ones and correct them +""" +import copy, math +from practice.core import Task, rng_for, to_json, c_int, c_num, c_set, c_list, clear_of + +ENV = "means-test" + +ADULT = {1: 4100, 2: 6900} +CHILD = [(5, 1450), (12, 1800), (17, 2250)] # (oldest age in band, amount) +COMMON = {1: 900, 2: 1100, 3: 1350, 4: 1550, 5: 1750}; COMMON_6 = 1900 +RENT_CAP = {1: 5200, 2: 6400, 3: 7300, 4: 8100}; RENT_CAP_5 = 8800 +DISREGARD_RATE, DISREGARD_MAX = 0.25, 1200 +COUNTED = ["child_benefit", "maintenance", "pension", "unemployment_benefit", "sickness_benefit"] +EXEMPT = ["disability_allowance", "funeral_grant", "school_meal_voucher"] +ASSET_EXEMPT = {1: 8000, 2: 12000}; ASSET_PER_CHILD = 1500 +SANCTION_PCT = {0: 0, 1: 15, 2: 30} +WRITE_OFF, RECOVERY_PCT = 300, 10 + +REGULATION = """# Eskermark Local Support Ordinance (fictional) + +The Municipality of Eskermark, this ordinance and every amount in it are invented for practice. They do not describe any real benefit scheme. All amounts are per calendar month and in florins (fl). Do not round intermediate results. + +## 1. The household + +The household's **members** are the applicant, the applicant's partner if they live together, and their children under 18 who live with them. In a case file these have the role `applicant`, `partner` or `child`. The applicant and the partner are the adult members. + +Anyone else who lives in the home has the role `other_resident` (for example a grown-up child or a lodger). An other resident is not a member: their income is ignored and they add nothing to the norm, but they count as a resident when the rent is shared out (section 3). + +## 2. The norm + +The norm is the adult amount plus the child amounts plus the common costs. + +| Adult amount | fl | +|---|---| +| One adult member | 4100 | +| Two adult members (a couple) | 6900 | + +| Child amount, for each child member | fl | +|---|---| +| Age 0 to 5 | 1450 | +| Age 6 to 12 | 1800 | +| Age 13 to 17 | 2250 | + +| Common costs, by number of members | fl | +|---|---| +| 1 | 900 | +| 2 | 1100 | +| 3 | 1350 | +| 4 | 1550 | +| 5 | 1750 | +| 6 or more | 1900 | + +Sanction: if the case file records `sanction_level` 1, the adult amount is reduced by 15%. At `sanction_level` 2 it is reduced by 30%. The child amounts and the common costs are never reduced. Level 0, or no entry, means no sanction. + +## 3. Housing allowance + +The household's rent share is the monthly rent times the number of members, divided by the number of residents (members plus other residents). With no other residents the rent share is the whole rent. + +The housing allowance is the rent share, but not more than the cap for the number of members: + +| Number of members | Cap, fl | +|---|---| +| 1 | 5200 | +| 2 | 6400 | +| 3 | 7300 | +| 4 | 8100 | +| 5 or more | 8800 | + +## 4. Countable income + +Each person's income is listed by type. + +- `earnings` of an adult member: add up that adult's earnings, then take off the work disregard, which is 25% of that adult's earnings but not more than 1200 fl per adult. What is left counts. +- Counted in full, whichever member receives it: `child_benefit`, `maintenance`, `pension`, `unemployment_benefit`, `sickness_benefit`. +- Not counted at all: `disability_allowance`, `funeral_grant`, `school_meal_voucher`, and any `earnings` of a child member. + +Countable income is the sum over all members. + +## 5. Assets + +The asset exemption is 8000 fl for a household with one adult member and 12000 fl for a couple, plus 1500 fl for each child member. The asset excess is the household's liquid assets minus the exemption, or 0 if that is negative. The asset excess is assessed afresh for every month and every period, with the exemption of the household as it then is. + +## 6. Monthly entitlement + + entitlement = norm + housing allowance - countable income - asset excess + +If this is negative, the entitlement is 0 and the household has no entitlement. For a month in which nothing changes, the benefit payable is the entitlement. + +## 7. Changes during a month + +A change takes effect on its date: that day and the days after it are assessed on the new circumstances. Split the month into periods at each change date. For each period, work out the monthly entitlement (sections 2 to 6) as if the circumstances of that period had lasted the whole month. Then + + benefit payable for the month = sum over the periods of (monthly entitlement of the period * days in the period / days in the month) + +If a case file gives a `claim_date`, no benefit is payable for the days before it: the first period starts on the claim date. + +## 8. Overpayments and recovery + +When benefit has been paid on circumstances that later prove to have been different, then for each month under review: + + correct benefit = the benefit payable for that month on the true circumstances (using section 7 if the change came during the month) + overpayment = amount paid - correct benefit + +The total overpayment is the sum over the months under review. + +- A total overpayment under 300 fl is written off: nothing is recovered. +- Otherwise it is recovered by a monthly deduction of 10% of the unsanctioned adult amount of the household as it is after the change (410 fl for one adult member, 690 fl for a couple) until the total is repaid. The number of deductions is the total overpayment divided by the monthly deduction, rounded up. Every deduction is the full monthly deduction except the last, which is whatever is still owed. +""" + +# ---------------------------------------------------------------- the assessment +def child_amount(age): + for top, amount in CHILD: + if age <= top: return amount + raise ValueError("not a child: %r" % age) + +def assess(hh, mistake=None): + """Assess one household for a full month. `mistake` (review family only) reproduces a caseworker's error.""" + adults = [m for m in hh["members"] if m["role"] in ("applicant", "partner")] + kids = [m for m in hh["members"] if m["role"] == "child"] + n_mem, n_res = len(adults) + len(kids), len(hh["members"]) + pct = 0 if mistake == "sanction_ignored" else SANCTION_PCT[hh.get("sanction_level", 0)] + adult_amount = ADULT[len(adults)] * (100 - pct) / 100.0 + if mistake == "two_singles": adult_amount = 2 * ADULT[1] * (100 - pct) / 100.0 + ages = [k["age"] for k in kids] + if mistake == "child_band": ages[0] = 9 if ages[0] <= 5 else 15 if ages[0] <= 12 else 9 # the neighbouring age band + n_common = n_mem + (1 if mistake == "common_costs" else 0) + norm = adult_amount + sum(child_amount(a) for a in ages) + COMMON.get(n_common, COMMON_6) + share = hh["monthly_rent"] * (1.0 if mistake == "rent_not_shared" else n_mem / float(n_res)) + housing = share if mistake == "rent_not_capped" else min(share, RENT_CAP.get(n_mem, RENT_CAP_5)) + income = 0.0 + for m in adults + kids: + earned = sum(i["amount"] for i in m["income"] if i["type"] == "earnings") + if m["role"] != "child": + dis = DISREGARD_RATE * earned if mistake == "uncapped_disregard" else min(DISREGARD_RATE * earned, DISREGARD_MAX) + income += earned - (0 if mistake == "no_disregard" else dis) + income += sum(i["amount"] for i in m["income"] if i["type"] in COUNTED or (mistake == "exempt_counted" and i["type"] in EXEMPT)) + excess = max(0, hh["liquid_assets"] - ASSET_EXEMPT[len(adults)] - ASSET_PER_CHILD * len(kids)) + if mistake == "assets_ignored": excess = 0 + raw = norm + housing - income - excess + return {"norm": norm, "housing_allowance": housing, "countable_income": income, "asset_excess": float(excess), "raw": raw, "benefit": max(0.0, raw)} + +def apply_change(hh, ch): + """The household after a change of circumstances (the original is left untouched).""" + new = copy.deepcopy(hh) + if ch["type"] == "income_change": + for m in new["members"]: + if m["person"] == ch["person"]: m["income"] = copy.deepcopy(ch["income"]) + elif ch["type"] == "rent_change": new["monthly_rent"] = ch["monthly_rent"] + elif ch["type"] == "member_joins": new["members"].append(copy.deepcopy(ch["member"])) + elif ch["type"] == "member_leaves": new["members"] = [m for m in new["members"] if m["person"] != ch["person"]] + else: raise ValueError(ch["type"]) + return new + +def prorate(rates, days, days_in_month): + """Section 7: sum of monthly entitlement * days in the period / days in the month.""" + return sum(x * n for x, n in zip(rates, days)) / float(days_in_month) + +def month_periods(hh, changes, days_in_month, claim_day=1): + """changes: list of (day of month, change dict). Returns (list of households per period, list of days per period), + starting at claim_day. Changes on or before claim_day alter the first period's household.""" + cur, start, hhs, days = hh, claim_day, [], [] + for day, ch in sorted(changes, key=lambda x: x[0]): + if day > start: + hhs.append(cur); days.append(day - start); start = day + cur = apply_change(cur, ch) + hhs.append(cur); days.append(days_in_month - start + 1) + return hhs, days + +def recovery_plan(total, n_adults): + """Section 8. Returns (monthly deduction, number of deductions, last deduction); (deduction, 0, 0.0) if nothing is recovered.""" + ded = ADULT[n_adults] * RECOVERY_PCT / 100.0 + if total < WRITE_OFF: return ded, 0, 0.0 + n = int(math.ceil(total / ded - 1e-9)) + return ded, n, total - ded * (n - 1) + +# ---------------------------------------------------------------- synthetic households +def n_adults(hh): return sum(1 for m in hh["members"] if m["role"] in ("applicant", "partner")) + +def adult_income(r, d, level): + """level: 'low', 'mid' or 'high' earnings.""" + inc = [] + u = r.random() + if level == "high": inc.append({"type": "earnings", "amount": r.randrange(9500, 16000, 50)}) + elif u < 0.6: + inc.append({"type": "earnings", "amount": r.randrange(1500, 5000, 50) if level == "low" else r.randrange(3000, 9000, 50)}) + if d >= 2 and r.random() < 0.25: inc.append({"type": "earnings", "amount": r.randrange(400, 2500, 50)}) + elif u < 0.85: inc.append({"type": r.choice(["unemployment_benefit", "sickness_benefit", "pension"]), "amount": r.randrange(2000, 5500, 50)}) + if d >= 2 and r.random() < 0.2: inc.append({"type": r.choice(["disability_allowance", "funeral_grant"]), "amount": r.randrange(500, 2500, 50)}) + return inc + +def make_household(r, cid, d, level=None, sanctions=False, others=False): + level = level or r.choice(["low", "mid", "mid"]) + members = [] + for role in ["applicant"] + (["partner"] if r.random() < 0.4 else []): + members.append({"person": "P%d" % (len(members) + 1), "role": role, "age": r.randint(19, 62), "income": adult_income(r, d, level)}) + single = len(members) == 1 + for _ in range(r.choice([0, 0, 1, 1, 2, 2, 3] + ([4] if d >= 2 else []))): + age = r.randint(0, 17) + inc = [{"type": "child_benefit", "amount": r.choice([600, 650, 700])}] + if single and r.random() < 0.4: inc.append({"type": "maintenance", "amount": r.randrange(800, 1900, 50)}) + if d >= 2 and age >= 6 and r.random() < 0.25: inc.append({"type": "school_meal_voucher", "amount": r.randrange(150, 350, 10)}) + if d >= 3 and age >= 15 and r.random() < 0.5: inc.append({"type": "earnings", "amount": r.randrange(500, 2600, 50)}) + r.shuffle(inc) + members.append({"person": "P%d" % (len(members) + 1), "role": "child", "age": age, "income": inc}) + n_mem = len(members) + if others and r.random() < 0.35: + members.append({"person": "P%d" % (len(members) + 1), "role": "other_resident", "age": r.randint(18, 30), + "income": [{"type": "earnings", "amount": r.randrange(3000, 9000, 50)}] if r.random() < 0.7 else []}) + exempt = ASSET_EXEMPT[1 if single else 2] + ASSET_PER_CHILD * (n_mem - (1 if single else 2)) + if d >= 2 and r.random() < 0.3: assets = exempt + r.randrange(300, 5000, 100) + else: assets = r.randrange(0, min(exempt, 7000), 100) + hh = {"case_id": cid, "caseworker": r.choice(["LB", "OH", "TK", "ES"]), "members": members, + "monthly_rent": int(round(RENT_CAP.get(n_mem, RENT_CAP_5) * r.uniform(0.7, 1.25) / 50.0)) * 50, "liquid_assets": assets} + if sanctions: hh["sanction_level"] = r.choice([0, 0, 0, 1, 2]) + return hh + +def clear_household(r, cid, d, **kw): + """A household whose entitlement is clearly positive or clearly nil.""" + while True: + hh = make_household(r, cid, d, **kw) + if clear_of(assess(hh)["raw"], [0], 50): return hh + +def case_ids(r, n): return ["H%d" % i for i in sorted(r.sample(range(1001, 9999), n))] + +FIG = ["norm", "countable_income", "housing_allowance", "asset_excess", "benefit"] + +# ---------------------------------------------------------------- entitlement +def gen_entitlement(seed, d): + r = rng_for(ENV + "/entitlement", seed, d) + n = {1: 4, 2: 6, 3: 7}[d] + figs = [f for f in FIG if d >= 2 or f != "asset_excess"] + while True: + ids = case_ids(r, n); order = ids[:]; r.shuffle(order) + hhs = [clear_household(r, c, d, level="high" if i == 0 else None, sanctions=d >= 3, others=d >= 3) for i, c in enumerate(order)] + res = dict((h["case_id"], assess(h)) for h in hhs) + nil = [c for c in ids if res[c]["raw"] < 0] + if not 1 <= len(nil) <= n // 2: continue + if d >= 2 and not any(res[c]["asset_excess"] > 0 for c in ids): continue + if d >= 3 and not (any(h.get("sanction_level") for h in hhs) and any(m["role"] == "other_resident" for h in hhs for m in h["members"])): continue + break + checks = [] + for c in ids: + checks += [c_num("households.%s.%s" % (c, f), res[c][f], 2) for f in figs] + checks.append(c_set("no_entitlement", nil, weight=2)) + lines = ["- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,", + " - `norm`: the norm (section 2).", " - `countable_income`: the countable income (section 4).", + " - `housing_allowance`: the housing allowance (section 3)."] + if d >= 2: lines.append(" - `asset_excess`: the asset excess (section 5), 0 if there is none.") + lines += [" - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.", + "- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none)."] + if d >= 3: + checks.append(c_num("total_payable", sum(res[c]["benefit"] for c in ids), 2)) + lines.append("- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.") + inst = """# Means test: monthly entitlement + +`cases.json` holds the case files of %d households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month. + +Write `answer.json` in this folder, a JSON object with: + +%s + +Numbers are accepted within one unit of the last decimal place asked for. +""" % (n, "\n".join(lines)) + return Task(ENV, "entitlement", seed, d, "Assess %d households" % n, inst, + {"cases.json": to_json({"municipality": "Eskermark", "month": "2026-03", "cases": hhs}), "regulation.md": REGULATION}, checks, {"households": n}) + +# ---------------------------------------------------------------- change of circumstances +MONTHS = [("2026-01", 31), ("2026-02", 28), ("2026-03", 31), ("2026-04", 30), ("2026-05", 31), ("2026-06", 30), ("2026-07", 31), ("2026-08", 31), ("2026-09", 30), ("2026-10", 31)] + +def random_change(r, hh, d, kinds): + """One plausible change of circumstances for household hh (without its date).""" + adults = [m for m in hh["members"] if m["role"] in ("applicant", "partner")] + while True: + kind = r.choice(kinds) + if kind == "income_change": + m = r.choice(adults) + has_job = any(i["type"] == "earnings" for i in m["income"]) + keep = [i for i in m["income"] if i["type"] in EXEMPT] + if has_job and r.random() < 0.5: new = [{"type": "unemployment_benefit", "amount": r.randrange(2000, 5000, 50)}] # lost the job + else: new = [{"type": "earnings", "amount": r.randrange(2500, 9000, 50)}] # new job or new pay + return {"type": "income_change", "person": m["person"], "income": new + keep} + if kind == "rent_change": + return {"type": "rent_change", "monthly_rent": hh["monthly_rent"] + r.choice([-1, 1]) * r.randrange(300, 1500, 50)} + nxt = "P%d" % (max(int(m["person"][1:]) for m in hh["members"]) + 1) + if kind == "member_joins": + if len(adults) == 1 and r.random() < 0.5: + return {"type": "member_joins", "member": {"person": nxt, "role": "partner", "age": r.randint(20, 60), "income": adult_income(r, d, "mid")}} + return {"type": "member_joins", "member": {"person": nxt, "role": "child", "age": r.choice([0, 0, 3, 9, 14]), "income": [{"type": "child_benefit", "amount": 650}]}} + if kind == "member_leaves": + cand = [m for m in hh["members"] if m["role"] != "applicant"] + if cand: return {"type": "member_leaves", "person": r.choice(cand)["person"]} + +def gen_change(seed, d): + r = rng_for(ENV + "/change", seed, d) + n = {1: 3, 2: 4, 3: 4}[d] + kinds = ["income_change"] if d == 1 else ["income_change", "income_change", "rent_change", "member_joins", "member_leaves"] + month, dim = r.choice(MONTHS) + ids = case_ids(r, n) + cases, checks, zero, total = [], [], [], 0.0 + for ci, c in enumerate(ids): + while True: + hh = clear_household(r, c, d, others=d >= 3) + n_ch = 1 if d < 3 else r.choice([1, 2, 2]) + claim = r.randint(2, dim - 12) if (d >= 3 and (ci == 0 or r.random() < 0.3)) else 1 + days = sorted(r.sample(range(claim + 1, dim + 1), n_ch)) + cur, changes = hh, [] + for day in days: + ch = random_change(r, cur, d, kinds) + cur = apply_change(cur, ch); changes.append((day, ch)) + if n_adults(cur) > 2: continue + hhs, pdays = month_periods(hh, changes, dim, claim) + a = [assess(h) for h in hhs] + if not all(clear_of(x["raw"], [0], 50) for x in a): continue + rates = [x["benefit"] for x in a] + if all(abs(rates[i] - rates[i + 1]) < 1 for i in range(len(rates) - 1)) and r.random() < 0.8: continue # mostly, the change matters + if sum(rates) == 0 and r.random() < 0.7: continue + rr = [round(x, 2) for x in rates] # an ordered-list check cannot tell a palindrome from its reverse + if (pdays == pdays[::-1] and len(set(pdays)) > 1) or (rr == rr[::-1] and len(set(rr)) > 1): continue + break + pay = prorate(rates, pdays, dim) + rec = dict(hh) + if claim > 1: rec["claim_date"] = "%s-%02d" % (month, claim) + chs = [dict([("date", "%s-%02d" % (month, day))] + list(ch.items())) for day, ch in changes] + if d >= 3: r.shuffle(chs) + rec["changes"] = chs + cases.append(rec) + checks += [c_list("cases.%s.days" % c, pdays, item="int"), c_list("cases.%s.rates" % c, [round(x, 2) for x in rates], item="number", abs_tol=0.01), + c_num("cases.%s.payable" % c, pay, 2, weight=2)] + if pay == 0: zero.append(c) + total += pay + r.shuffle(cases) + checks += [c_set("nothing_payable", zero, weight=2), c_num("total_payable", total, 2)] + inst = """# Means test: a change during the month + +`cases.json` holds %d household case files from the Municipality of Eskermark for %s (%d days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect%s. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month. + +The kinds of change are: + +- `income_change`: the named person's whole income list is replaced by the list given. +%s +Write `answer.json` in this folder, a JSON object with: + +- `cases`: an object keyed by case id. Each value has + - `days`: a list of integers, the number of days in each period, in date order. + - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals. + - `payable`: the benefit payable for the month, fl with 2 decimals. +- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none). +- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals. + +Numbers are accepted within one unit of the last decimal place asked for. +""" % (n, month, dim, " (not always listed in date order). Some files have a `claim_date`: see section 7" if d >= 3 else "", + "" if d == 1 else "- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n") + return Task(ENV, "change", seed, d, "Prorate %d cases with a change during the month" % n, inst, + {"cases.json": to_json({"municipality": "Eskermark", "month": month, "days_in_month": dim, "cases": cases}), "regulation.md": REGULATION}, + checks, {"cases": n}) + +# ---------------------------------------------------------------- overpayment +def gen_overpayment(seed, d): + r = rng_for(ENV + "/overpayment", seed, d) + n = {1: 3, 2: 4, 3: 5}[d] + ids = case_ids(r, n) + plan = ["normal"] * n + if d >= 2: plan[0] = "small" + if d >= 3: plan[1] = "exempt"; plan[2] = "partner" + r.shuffle(plan) + cases, checks, written, recover_total = [], [], [], 0.0 + for c, kind in zip(ids, plan): + while True: + hh = clear_household(r, c, d) + paid = assess(hh) + if paid["raw"] < 600: continue + n_m = 3 if d == 1 else r.choice([3, 4]) + start = r.randrange(0, len(MONTHS) - n_m + 1); months = MONTHS[start:start + n_m] + mi = r.randrange(0 if kind != "small" else n_m - 1, n_m) # the month in which the change took effect + day = 1 if d == 1 else r.randint(1 if kind != "small" else 10, months[mi][1]) + adults = [m for m in hh["members"] if m["role"] in ("applicant", "partner")] + m = r.choice(adults) + if kind == "small": + ch = {"type": "income_change", "person": m["person"], "income": m["income"] + [{"type": "maintenance", "amount": r.randrange(60, 260, 10)}]} + elif kind == "exempt": + ch = {"type": "income_change", "person": m["person"], "income": m["income"] + [{"type": "disability_allowance", "amount": r.randrange(800, 2500, 50)}]} + elif kind == "partner": + if len(adults) != 1: continue + ch = {"type": "member_joins", "member": {"person": "P%d" % (len(hh["members"]) + 1), "role": "partner", "age": r.randint(20, 60), + "income": [{"type": "earnings", "amount": r.randrange(2500, 8000, 50)}]}} + else: + extra = r.choice([{"type": "earnings", "amount": r.randrange(1200, 6000, 50)}, {"type": "pension", "amount": r.randrange(500, 3000, 50)}, + {"type": "maintenance", "amount": r.randrange(500, 2000, 50)}]) + ch = {"type": "income_change", "person": m["person"], "income": m["income"] + [extra]} + after = apply_change(hh, ch) + if not clear_of(assess(after)["raw"], [0], 50): continue + correct = [] + for j, (mon, dim) in enumerate(months): + if j < mi: correct.append(paid["benefit"]) + elif j > mi: correct.append(assess(after)["benefit"]) + else: + hs, pd = month_periods(hh, [(day, ch)], dim) + correct.append(prorate([assess(h)["benefit"] for h in hs], pd, dim)) + total = sum(paid["benefit"] - x for x in correct) + if abs(total) < 1e-6: total = 0.0 + ded, n_ded, last = recovery_plan(total, n_adults(after)) + if kind == "exempt": + if total != 0: continue + elif kind == "small": + if not 20 < total < WRITE_OFF - 30: continue + else: + q = total / ded + if total < WRITE_OFF + 30 or abs(q - round(q)) < 0.03: continue + break + rec = dict(hh) + rec["benefit_paid"] = [{"month": mon, "days_in_month": dim, "paid": round(paid["benefit"], 2)} for mon, dim in months] + rec["discovered_change"] = dict([("date", "%s-%02d" % (months[mi][0], day))] + list(ch.items())) + cases.append(rec) + for (mon, dim), x in zip(months, correct): checks.append(c_num("cases.%s.correct.%s" % (c, mon), x, 2)) + checks += [c_num("cases.%s.total_overpayment" % c, total, 2, weight=2), c_int("cases.%s.deductions" % c, n_ded)] + if n_ded: checks.append(c_num("cases.%s.last_deduction" % c, last, 2)); recover_total += total + elif total > 0: written.append(c) + r.shuffle(cases) + lines = ["- `cases`: an object keyed by case id. Each value has", + " - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.", + " - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).", + " - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).", + " - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered."] + if d >= 2: + checks.append(c_set("written_off", written, weight=2)) + lines.append("- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).") + if d >= 3: + checks.append(c_num("total_to_recover", recover_total, 2)) + lines.append("- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.") + inst = """# Means test: overpayments + +`cases.json` holds %d household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery%s. + +The kinds of change are: + +- `income_change`: the named person's whole income list is replaced by the list given. +%s +Write `answer.json` in this folder, a JSON object with: + +%s + +Numbers are accepted within one unit of the last decimal place asked for. +""" % (n, "" if d == 1 else ", and section 7 a change that falls inside a month", "" if d < 3 else "- `member_joins`: the person given moved in, with the role shown.\n", "\n".join(lines)) + return Task(ENV, "overpayment", seed, d, "Work out overpayments for %d cases" % n, inst, + {"cases.json": to_json({"municipality": "Eskermark", "cases": cases}), "regulation.md": REGULATION}, checks, {"cases": n}) + +# ---------------------------------------------------------------- review of decisions +def possible_mistakes(hh, d): + adults = [m for m in hh["members"] if m["role"] in ("applicant", "partner")] + kids = [m for m in hh["members"] if m["role"] == "child"] + out = ["no_disregard", "uncapped_disregard", "rent_not_capped", "common_costs", "slip"] + if kids: out.append("child_band") + if len(adults) == 2: out.append("two_singles") + if d >= 2: out += ["exempt_counted", "assets_ignored"] + if d >= 3: out += ["sanction_ignored", "rent_not_shared"] + return out + +def gen_review(seed, d): + r = rng_for(ENV + "/review", seed, d) + n, n_wrong = {1: (5, 2), 2: (7, 3), 3: (9, 4)}[d] + figs = [f for f in FIG if d >= 2 or f != "asset_excess"] + ids = case_ids(r, n) + wrong = sorted(r.sample(ids, n_wrong)) + cases, checks, under, over = [], [], 0.0, 0.0 + used = set() + for c in ids: + while True: + hh = clear_household(r, c, d, sanctions=d >= 3, others=d >= 3) + ok = assess(hh) + if c not in wrong: dec = ok; break + if ok["raw"] < 0 and r.random() < 0.8: continue + opts = [] + for mk in possible_mistakes(hh, d): + if mk == "slip": + if ok["benefit"] < 1500: continue + bad = dict(ok); bad["benefit"] = ok["benefit"] + r.choice([-1000, -900, -100, 100, 1000]) + else: bad = assess(hh, mk) + if abs(bad["benefit"] - ok["benefit"]) >= 20: opts.append((mk, bad)) + fresh = [o for o in opts if o[0] not in used] + if not fresh: continue + mk, dec = r.choice(fresh); used.add(mk) + break + rec = dict(hh); rec["decision"] = dict((f, round(dec[f], 2)) for f in figs) + cases.append(rec) + if c in wrong: + checks += [c_num("corrected.%s.%s" % (c, f), ok[f], 2) for f in figs] + diff = ok["benefit"] - round(dec["benefit"], 2) + checks.append(c_num("corrected.%s.difference" % c, diff, 2)) + if diff > 0: under += diff + else: over -= diff + r.shuffle(cases) + checks.append(c_set("wrong_decisions", wrong, weight=2)) + lines = ["- `wrong_decisions`: list of the case ids whose decision is wrong (any order).", + "- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: %s, and" % ", ".join("`%s`" % f for f in figs), + " - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much)."] + if d >= 3: + checks += [c_num("total_underpaid", under, 2), c_num("total_overpaid", over, 2)] + lines += ["- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).", + "- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none)."] + inst = """# Means test: review of decisions + +`decisions.json` holds %d household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance%s and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month. + +Re-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong. + +Write `answer.json` in this folder, a JSON object with: + +%s + +Numbers are accepted within one unit of the last decimal place asked for. +""" % (n, ", the asset excess" if d >= 2 else "", "\n".join(lines)) + return Task(ENV, "review", seed, d, "Review %d benefit decisions" % n, inst, + {"decisions.json": to_json({"municipality": "Eskermark", "month": "2026-03", "decisions": cases}), "regulation.md": REGULATION}, + checks, {"decisions": n, "wrong": n_wrong}) + +FAMILIES = {"entitlement": gen_entitlement, "change": gen_change, "overpayment": gen_overpayment, "review": gen_review} + +def generate(seed, difficulty, family=None): + fam = family or sorted(FAMILIES)[seed % len(FAMILIES)] + return FAMILIES[fam](seed, difficulty) diff --git a/envs/means_test/oracle.py b/envs/means_test/oracle.py new file mode 100644 index 0000000000000000000000000000000000000000..72dcb8a4f6d6f6c54db3ec40d487a7811ea6fb86 --- /dev/null +++ b/envs/means_test/oracle.py @@ -0,0 +1,155 @@ +#!/usr/bin/env python3 +"""Reference solution for Means Test. Works only from the files in the current directory. +The rates below are read off regulation.md (Eskermark Local Support Ordinance, fictional).""" +import json, os +from fractions import Fraction as F + +ADULT_ONE, ADULT_COUPLE = 4100, 6900 +COMMON_COSTS = [900, 1100, 1350, 1550, 1750, 1900] # 1, 2, 3, 4, 5, 6 or more members +RENT_CAPS = [5200, 6400, 7300, 8100, 8800] # 1, 2, 3, 4, 5 or more members +FULLY_COUNTED = set(["child_benefit", "maintenance", "pension", "unemployment_benefit", "sickness_benefit"]) + +def load(name): + with open(name) as f: return json.load(f) + +def money(x): return round(float(x), 2) + +def assess(case): + people = case["members"] + grown = [p for p in people if p["role"] == "applicant" or p["role"] == "partner"] + young = [p for p in people if p["role"] == "child"] + size = len(grown) + len(young) + # section 2 + adult = F(ADULT_COUPLE if len(grown) == 2 else ADULT_ONE) + level = case.get("sanction_level") or 0 + if level == 1: adult -= adult * F(15, 100) + elif level == 2: adult -= adult * F(30, 100) + norm = adult + COMMON_COSTS[min(size, 6) - 1] + for p in young: + norm += 1450 if p["age"] < 6 else 1800 if p["age"] < 13 else 2250 + # section 3 + share = F(case["monthly_rent"]) * size / len(people) + housing = min(share, F(RENT_CAPS[min(size, 5) - 1])) + # section 4 + income = F(0) + for p in grown + young: + wages = F(0) + for line in p.get("income", []): + if line["type"] == "earnings": wages += F(str(line["amount"])) + elif line["type"] in FULLY_COUNTED: income += F(str(line["amount"])) + if p["role"] != "child": + income += wages - min(wages / 4, F(1200)) + # section 5 + allowed = (12000 if len(grown) == 2 else 8000) + 1500 * len(young) + excess = max(F(0), F(case["liquid_assets"]) - allowed) + # section 6 + ent = max(F(0), norm + housing - income - excess) + return {"norm": norm, "countable_income": income, "housing_allowance": housing, "asset_excess": excess, "benefit": ent, "adults": len(grown)} + +def changed(case, ch): + new = json.loads(json.dumps(case)) + kind = ch["type"] + if kind == "income_change": + for p in new["members"]: + if p["person"] == ch["person"]: p["income"] = ch["income"] + elif kind == "rent_change": new["monthly_rent"] = ch["monthly_rent"] + elif kind == "member_joins": new["members"].append(ch["member"]) + elif kind == "member_leaves": new["members"] = [p for p in new["members"] if p["person"] != ch["person"]] + return new + +def day_of(date): return int(date.split("-")[2]) + +def month_plan(case, changes, n_days, first_day=1): + """Entitlement on each day from first_day to the end of the month, grouped into periods: [(entitlement, days, household)].""" + changes = sorted(changes, key=lambda c: c["date"]) + periods = [] + for day in range(first_day, n_days + 1): + cur = case + for ch in changes: + if day_of(ch["date"]) <= day: cur = changed(cur, ch) + starts_new = day == first_day or any(day_of(ch["date"]) == day for ch in changes) + if starts_new: periods.append([assess(cur)["benefit"], 1, cur]) + else: periods[-1][1] += 1 + return periods + +def entitlement(): + ans = {"households": {}, "no_entitlement": []} + total = F(0) + for case in load("cases.json")["cases"]: + a = assess(case) + ans["households"][case["case_id"]] = dict((k, money(a[k])) for k in ("norm", "countable_income", "housing_allowance", "asset_excess", "benefit")) + if a["benefit"] == 0: ans["no_entitlement"].append(case["case_id"]) + total += a["benefit"] + ans["total_payable"] = money(total) + return ans + +def change(): + data = load("cases.json") + n_days = data["days_in_month"] + ans = {"cases": {}, "nothing_payable": []} + total = F(0) + for case in data["cases"]: + first = day_of(case["claim_date"]) if case.get("claim_date") else 1 + periods = month_plan(case, case["changes"], n_days, first) + pay = sum(e * d for e, d, _ in periods) / n_days + ans["cases"][case["case_id"]] = {"days": [d for _, d, _ in periods], "rates": [money(e) for e, _, _ in periods], "payable": money(pay)} + if pay == 0: ans["nothing_payable"].append(case["case_id"]) + total += pay + ans["total_payable"] = money(total) + return ans + +def overpayment(): + ans = {"cases": {}, "written_off": []} + grand = F(0) + for case in load("cases.json")["cases"]: + ch = case["discovered_change"] + after = changed(case, ch) + out = {"correct": {}} + total = F(0) + for m in case["benefit_paid"]: + if m["month"] < ch["date"][:7]: right = assess(case)["benefit"] + elif m["month"] > ch["date"][:7]: right = assess(after)["benefit"] + else: right = sum(e * d for e, d, _ in month_plan(case, [ch], m["days_in_month"])) / m["days_in_month"] + out["correct"][m["month"]] = money(right) + total += F(str(m["paid"])) - right + out["total_overpayment"] = money(total) + if total < 300: + out["deductions"] = 0 + if total > 0: ans["written_off"].append(case["case_id"]) + else: + step = F(ADULT_COUPLE if assess(after)["adults"] == 2 else ADULT_ONE) / 10 + count = 0; owed = total + while owed > step: + owed -= step; count += 1 + out["deductions"] = count + 1 + out["last_deduction"] = money(owed) + grand += total + ans["cases"][case["case_id"]] = out + ans["total_to_recover"] = money(grand) + return ans + +def review(): + ans = {"wrong_decisions": [], "corrected": {}} + under = over = F(0) + for case in load("decisions.json")["decisions"]: + a = assess(case) + dec = case["decision"] + if all(abs(float(a[k]) - dec[k]) <= 0.01 for k in dec): continue + cid = case["case_id"] + ans["wrong_decisions"].append(cid) + fix = dict((k, money(a[k])) for k in dec) + diff = a["benefit"] - F(str(dec["benefit"])) + fix["difference"] = money(diff) + if diff > 0: under += diff + else: over -= diff + ans["corrected"][cid] = fix + ans["total_underpaid"], ans["total_overpaid"] = money(under), money(over) + return ans + +if os.path.exists("decisions.json"): answer = review() +else: + first = load("cases.json")["cases"][0] + if "discovered_change" in first: answer = overpayment() + elif "changes" in first: answer = change() + else: answer = entitlement() +with open("answer.json", "w") as f: json.dump(answer, f, indent=1) diff --git a/envs/price_index/__init__.py b/envs/price_index/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/envs/price_index/env.toml b/envs/price_index/env.toml new file mode 100644 index 0000000000000000000000000000000000000000..c91756f0c01de56be96300012fda8ef649e1446f --- /dev/null +++ b/envs/price_index/env.toml @@ -0,0 +1,7 @@ +name = "price-index" +title = "Price Index" +isced = "0311" +summary = "Compute an economic statistician's measures from raw tables: price indices, real GDP and chain-linked volumes, inequality and poverty, and inflation contributions." +task_type = "economic statistics calculation" +good_for = ["Index-number formulas applied exactly", "Unit and currency conversion in tabular data", "Multi-step aggregation with graded reward"] +families = ["basket-indices", "national-accounts", "income-distribution", "inflation-contributions"] diff --git a/envs/price_index/gen.py b/envs/price_index/gen.py new file mode 100644 index 0000000000000000000000000000000000000000..c6f878501ad3152a1487b412bc65c7ed03b30cc5 --- /dev/null +++ b/envs/price_index/gen.py @@ -0,0 +1,474 @@ +"""Price Index (ISCED-F 0311 Economics). + +Four task families, all from synthetic data: + basket-indices Laspeyres, Paasche and Fisher price indices from price and quantity tables + national-accounts nominal GDP, real GDP at base-year prices, deflator, chain-linked volume index + income-distribution Gini coefficient, quintile shares, S80/S20, at-risk-of-poverty rate + inflation-contributions all-items index, inflation rate and contributions by category + +Formulas and sources (each is also written into the task instruction) + Laspeyres 100*sum(p_t q_0)/sum(p_0 q_0); Paasche 100*sum(p_t q_t)/sum(p_0 q_t); Fisher sqrt(L*P) + (ILO/IMF/OECD/Eurostat/UN/World Bank, "Consumer Price Index Manual", 2004, ch. 15-17). + Chain-linked volume index with annual links at previous-year prices (Laspeyres volume links), as in + the System of National Accounts 2008, ch. 15: link_t = sum(p_{t-1} q_t) / sum(p_{t-1} q_{t-1}). + Gini coefficient by the sorted-rank formula G = 2*sum(i*x_i)/(n*sum(x)) - (n+1)/n, x ascending, i = 1..n. + Income quintile share ratio S80/S20 and at-risk-of-poverty threshold at 60% of the median equivalised + income, with the OECD-modified equivalence scale 1.0 / 0.5 / 0.3 (Eurostat, EU-SILC methodology). + The scale values are stated in the task. + Contributions to the change of a fixed-weight Laspeyres-type index: + c_i = w_i * (I_i,t - I_i,s) / I_all,s * 100 with weights that sum to 1 and refer to the period where + every sub-index equals 100 (CPI Manual 2004, ch. 9; the fixed-weight case, with no chain-linking). +""" +import math +from practice.core import Task, rng_for, to_csv, to_json, c_int, c_num, c_str, c_set + +ENV = "price-index" +TOL = "Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for." + +# ---------------------------------------------------------------- formulas +def price_indices(p0, q0, pt, qt): + """Dicts keyed by item (the same items in all four). Returns (Laspeyres, Paasche, Fisher), base = 100.""" + items = sorted(p0) + las = 100.0 * sum(pt[i] * q0[i] for i in items) / sum(p0[i] * q0[i] for i in items) + paa = 100.0 * sum(pt[i] * qt[i] for i in items) / sum(p0[i] * qt[i] for i in items) + return las, paa, math.sqrt(las * paa) + +def value(p, q): + return sum(p[i] * q[i] for i in p) + +def chain_index(prices, quants, ref): + """prices, quants: lists (one per year, in order) of dicts keyed by product. ref: position of the reference year (= 100).""" + n = len(prices) + link = [None] + [value(prices[t - 1], quants[t]) / value(prices[t - 1], quants[t - 1]) for t in range(1, n)] + out = [None] * n + out[ref] = 100.0 + for t in range(ref + 1, n): out[t] = out[t - 1] * link[t] + for t in range(ref - 1, -1, -1): out[t] = out[t + 1] / link[t + 1] + return out + +def gini(xs): + """Sorted-rank formula.""" + x = sorted(xs); n = len(x) + return 2.0 * sum((i + 1) * v for i, v in enumerate(x)) / (n * sum(x)) - (n + 1.0) / n + +def median(xs): + x = sorted(xs); n = len(x) + return x[n // 2] if n % 2 else (x[n // 2 - 1] + x[n // 2]) / 2.0 + +def quintile_shares(xs): + """Shares in per cent of the five equal-sized groups, poorest first. len(xs) must be a multiple of 5.""" + x = sorted(xs); k = len(x) // 5; tot = float(sum(x)) + return [100.0 * sum(x[j * k:(j + 1) * k]) / tot for j in range(5)] + +def equivalence_scale(members_14_plus, children_under_14): + return 1.0 + 0.5 * (members_14_plus - 1) + 0.3 * children_under_14 + +def contributions(weights, idx_s, idx_t): + """Dicts keyed by category; weights on any scale. Returns (index at s, index at t, inflation %, contributions in points).""" + w = float(sum(weights.values())) + a_s = sum(weights[c] * idx_s[c] for c in weights) / w + a_t = sum(weights[c] * idx_t[c] for c in weights) / w + contrib = dict((c, weights[c] / w * (idx_t[c] - idx_s[c]) / a_s * 100.0) for c in weights) + return a_s, a_t, (a_t / a_s - 1) * 100.0, contrib + +# ---------------------------------------------------------------- basket indices +ITEMS = [("bread", "kg", 3.2), ("milk", "litre", 1.1), ("eggs", "each", 0.28), ("coffee", "kg", 11.5), ("butter", "kg", 8.4), ("apples", "kg", 2.6), + ("rice", "kg", 2.2), ("cheese", "kg", 9.8), ("olive oil", "litre", 7.5), ("chicken", "kg", 6.9), ("potatoes", "kg", 1.3), ("tea", "kg", 14.0), + ("sugar", "kg", 1.4), ("orange juice", "litre", 2.4), ("pasta", "kg", 1.9), ("yoghurt", "kg", 3.6)] +PACKS = {"kg": [(250, "g"), (500, "g"), (1, "kg"), (2, "kg"), (100, "g")], "litre": [(500, "ml"), (75, "cl"), (1, "litre"), (330, "ml"), (1.5, "litre")], + "each": [(1, "each"), (6, "each"), (1, "dozen")]} +TO_BASE = {"g": 0.001, "kg": 1.0, "ml": 0.001, "cl": 0.01, "litre": 1.0, "each": 1.0, "dozen": 12.0} + +def gen_basket(seed, d): + r = rng_for(ENV + "/basket-indices", seed, d) + nit = {1: 5, 2: 8, 3: 10}[d]; nper = {1: 3, 2: 4, 3: 5}[d] + y0 = r.randint(2010, 2020); periods = [str(y0 + i) for i in range(nper)] + items = r.sample(ITEMS, nit) + cur = dict((it[0], "CRN") for it in items) + rates = {} + if d >= 2: + for name in r.sample([it[0] for it in items], 3): cur[name] = r.choice(["ZED", "ORO"]) + for c in ("ZED", "ORO"): + lvl = r.uniform(0.6, 11.0) + for p in periods: + rates[c, p] = round(lvl, 4); lvl *= r.uniform(0.92, 1.1) + gone = {} + if d == 3: + a, b, c = r.sample([it[0] for it in items], 3) + gone[a] = set(periods[r.randint(2, nper - 1):]) # withdrawn from the market + gone[b] = set(periods[:r.randint(1, nper - 2)]) # introduced later + if r.random() < 0.6: gone[c] = set([periods[r.randint(1, nper - 2)]]) # not collected in one period + rows, price, quant = [], {}, {} + for name, unit, typical in items: + up = typical * r.uniform(0.75, 1.3); q = r.randint(8, 260) * (6 if unit == "each" else 1) + pack = r.choice(PACKS[unit]) if d == 3 else None + for p in periods: + if d == 3 and r.random() < 0.15: pack = r.choice(PACKS[unit]) # the pack on sale changes + rate = rates.get((cur[name], p), 1.0) + per_pack = pack[0] * TO_BASE[pack[1]] if pack else 1.0 + shown = max(0.05, round(up / rate * per_pack, 2)) + row = {"item": name, "period": p, "price": "%.2f" % shown, "currency": cur[name], "quantity": q, "quantity_unit": unit, "unit": unit, + "outlet": r.choice(["supermarket", "market stall", "corner shop", "online"])} + if pack: row.update(pack_size=pack[0], pack_unit=pack[1]) + if p not in gone.get(name, ()): + rows.append(row) + price[name, p] = shown * rate / per_pack; quant[name, p] = q + step = r.uniform(-0.04, 0.14) + up *= 1 + step + q = max(1, int(round(q * (1 - 0.6 * step) * r.uniform(0.93, 1.07)))) + keep = sorted(name for name, _, _ in items if all((name, p) in price for p in periods)) + excluded = sorted(name for name, _, _ in items if name not in keep) + def pq(p): return dict((i, price[i, p]) for i in keep), dict((i, quant[i, p]) for i in keep) + p0, q0 = pq(periods[0]) + checks, fisher = [], {periods[0]: 100.0} + for p in periods: + pt, qt = pq(p) + checks.append(c_num("basket_cost.%s" % p, value(pt, qt), 2)) + for p in periods[1:]: + pt, qt = pq(p) + las, paa, fis = price_indices(p0, q0, pt, qt); fisher[p] = fis + checks += [c_num("indices.%s.laspeyres" % p, las, 2), c_num("indices.%s.paasche" % p, paa, 2), c_num("indices.%s.fisher" % p, fis, 2)] + if d == 1: + header = ["item", "period", "price", "quantity", "unit"] + src = "`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in %d years. Prices are in crowns (CRN)." % nper + files = {} + else: + r.shuffle(rows) + files = {"exchange_rates.csv": to_csv([{"period": p, "currency": c, "crn_per_unit": "%.4f" % rates[c, p]} for c in ("ORO", "ZED") for p in periods], ["period", "currency", "crn_per_unit"])} + conv = "Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion." + if d == 2: + header = ["item", "period", "outlet", "price", "currency", "quantity", "unit"] + src = "`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in %d years, in no particular order. %s" % (nper, conv) + else: + header = ["item", "period", "outlet", "price", "currency", "pack_size", "pack_unit", "quantity", "quantity_unit"] + src = ("`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to %d years, in no particular order. %s\n\n" + "`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). " + "Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\n" + "Some items were not on sale, or not priced, in every year. Use only the items that have a row in all %d years, and leave the others out of every calculation, in every year.") % (nper, conv, nper) + files["basket.csv"] = to_csv(rows, header) + lines = ["- `basket_cost`: object keyed by year (as a string, for example `\"%s\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the %d years." % (periods[0], nper), + "- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals."] + if d == 3: + checks.append(c_set("excluded_items", excluded, weight=2)) + prev = periods[0] + for p in periods[1:]: + checks.append(c_num("fisher_change_percent.%s" % p, (fisher[p] / fisher[prev] - 1) * 100.0, 2)); prev = p + lines += ["- `excluded_items`: list of the items left out because they lack a row in some year (any order).", + "- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals."] + inst = """# Price indices for a household basket + +%s + +The base year is %s, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items: + +- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0) +- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t) +- Fisher index = square root of (Laspeyres x Paasche) + +Write `answer.json` in this folder, a JSON object with: + +%s + +%s +""" % (src, periods[0], "\n".join(lines), TOL) + return Task(ENV, "basket-indices", seed, d, "Price indices, %d items over %d years" % (nit, nper), inst, files, checks, {"items": nit, "periods": nper}) + +# ---------------------------------------------------------------- national accounts +FINAL = ["bread", "housing services", "vehicles", "clothing", "software", "restaurant meals", "furniture", "health care", "machinery", "electricity to homes"] +INTER = ["flour", "steel", "raw timber", "cotton yarn", "electricity to factories"] + +def gen_na(seed, d): + r = rng_for(ENV + "/national-accounts", seed, d) + nprod = {1: 3, 2: 5, 3: 6}[d]; nyear = {1: 3, 2: 5, 3: 5}[d] + y0 = r.randint(2008, 2019); years = list(range(y0, y0 + nyear)) + prods = r.sample(FINAL, nprod); inter = r.sample(INTER, 0 if d == 1 else 2 if d == 2 else 3) + base = years[0] if d == 1 else r.choice(years) + ref = years[0] if d <= 2 else r.choice(years[1:-1]) + while d == 3 and ref == base: ref = r.choice(years[1:-1]) + rows, P, Q = [], dict((y, {}) for y in years), dict((y, {}) for y in years) + for name in prods + inter: + p = round(r.uniform(4, 900), 2); q = r.randint(800, 90000) + gp, gq = r.uniform(-0.02, 0.09), r.uniform(-0.03, 0.07) + for y in years: + rows.append({"year": y, "product": name, "use": "intermediate" if name in inter else "final", "quantity": q, "unit_price": "%.2f" % p}) + if name in prods: P[y][name] = p; Q[y][name] = q + p = round(p * (1 + gp + r.uniform(-0.05, 0.05)), 2); q = max(1, int(q * (1 + gq + r.uniform(-0.06, 0.06)))) + if d >= 2: r.shuffle(rows) + nom = dict((y, value(P[y], Q[y])) for y in years) + real = dict((y, value(P[base], Q[y])) for y in years) + defl = dict((y, 100.0 * nom[y] / real[y]) for y in years) + files = {"output.csv": to_csv(rows, ["year", "product", "quantity", "unit_price"] if d == 1 else ["year", "product", "use", "quantity", "unit_price"])} + conf = {"base_year": base} + checks = [] + for y in years: + checks += [c_num("years.%d.nominal_gdp" % y, nom[y], 2), c_num("years.%d.real_gdp" % y, real[y], 2), c_num("years.%d.deflator" % y, defl[y], 2)] + lines = [" - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.", + " - `real_gdp`: the year's output valued at the prices of the base year %d, sum(p_base x q_t), 2 decimals." % base, + " - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals."] + extra, chain_text = "", "" + if d == 1: + for a, b in zip(years, years[1:]): + checks += [c_num("years.%d.real_growth_percent" % b, (real[b] / real[a] - 1) * 100, 2), c_num("years.%d.inflation_percent" % b, (defl[b] / defl[a] - 1) * 100, 2)] + lines += [" - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for %d)." % years[0], + " - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for %d)." % years[0]] + src = "`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over %d years. The base year is %d (also in `accounts.json`)." % (nyear, base) + else: + cvi = chain_index([P[y] for y in years], [Q[y] for y in years], years.index(ref)) + cv = dict(zip(years, cvi)) + conf["reference_year"] = ref + for y in years: checks.append(c_num("years.%d.chain_index" % y, cv[y], 2)) + lines.append(" - `chain_index`: the chain-linked volume index, with %d = 100, 2 decimals." % ref) + back = "" if d == 2 else " For the years before %d work backwards: index(t-1) = index(t) / link(t)." % ref + chain_text = """ +The chain-linked volume index links each year to the year before at the earlier year's prices: + +- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1)) +- index(%d) = 100, and index(t) = index(t-1) x link(t) for each later year.%s +""" % (ref, back) + src = ("`output.csv` gives the quantity produced and the unit price of each product in a small economy over %d years, in no particular order. " + "GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. " + "The base year for constant prices is %d and the reference year of the chain-linked index is %d (both also in `accounts.json`).") % (nyear, base, ref) + if d == 2: + for a, b in zip(years, years[1:]): + checks += [c_num("years.%d.real_growth_percent" % b, (real[b] / real[a] - 1) * 100, 2), c_num("years.%d.chain_growth_percent" % b, (cv[b] / cv[a] - 1) * 100, 2)] + lines += [" - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for %d)." % years[0], + " - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for %d)." % years[0]] + else: + pop = {}; n = r.randint(1500, 30000) + for y in years: pop[y] = n; n = int(n * r.uniform(0.995, 1.02)) + prow = [{"year": y, "population": pop[y]} for y in years]; r.shuffle(prow) + files["population.csv"] = to_csv(prow, ["year", "population"]) + for y in years: + checks += [c_num("years.%d.chained_volume_gdp" % y, nom[ref] * cv[y] / 100.0, 2), c_num("years.%d.real_gdp_per_capita" % y, real[y] / pop[y], 2)] + k = nyear - 1 + checks += [c_num("average_real_growth_percent", ((real[years[-1]] / real[years[0]]) ** (1.0 / k) - 1) * 100, 2), + c_num("average_chain_growth_percent", ((cv[years[-1]] / cv[years[0]]) ** (1.0 / k) - 1) * 100, 2)] + lines += [" - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of %d x chain index / 100, 2 decimals." % ref, + " - `real_gdp_per_capita`: real GDP (at %d prices) divided by the year's population in `population.csv`, 2 decimals." % base] + extra = """ +- `average_real_growth_percent`: the average annual growth rate of real GDP from %d to %d, ((last / first)^(1/%d) - 1) x 100, 2 decimals. +- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.""" % (years[0], years[-1], k) + files["accounts.json"] = to_json(conf) + inst = """# National accounts: nominal, real and chain-linked GDP + +%s +%s +Write `answer.json` in this folder, a JSON object with: + +- `years`: object keyed by year (as a string, for example `"%d"`). Each value has +%s%s + +%s +""" % (src, chain_text, years[0], "\n".join(lines), extra, TOL) + return Task(ENV, "national-accounts", seed, d, "GDP for %d years" % nyear, inst, files, checks, {"years": nyear, "products": nprod}) + +# ---------------------------------------------------------------- income distribution +GINI_TEXT = """Gini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then + + G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n + +Quintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the %s, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 %s). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1. + +Median: the middle value of the sorted incomes; with an even n, the mean of the two middle values.""" + +def gen_income(seed, d): + r = rng_for(ENV + "/income-distribution", seed, d) + n = {1: r.choice([20, 25, 30]), 2: r.choice([40, 45, 50, 60]), 3: r.choice([35, 40, 45, 50])}[d] + mu, sigma = r.uniform(10.0, 10.8), r.uniform(0.35, 0.75) + ids = ["H%03d" % i for i in r.sample(range(1, 400), n)] + while True: + rows, inc, size, kids = [], [], [], [] + for h in ids: + m = r.choice([1, 1, 2, 2, 2, 3, 4]); c = r.choice([0, 0, 0, 1, 2, 2, 3]) if d == 3 else 0 + y = math.exp(r.gauss(mu, sigma)) * (0.6 + 0.4 * m if d == 3 else 1.0) + row = {"household_id": h, "region": r.choice(["north", "south", "east", "west"]), "tenure": r.choice(["owner", "tenant"])} + if d == 1: + y = int(round(y)); row["disposable_income"] = y + else: + transfers = int(round(y * r.choice([0.0, 0.05, 0.15, 0.4, 0.8]) * r.uniform(0.6, 1.2))) + gross = int(round(y * r.uniform(1.15, 1.4))) + self_emp = int(round(max(0, gross - transfers) * r.choice([0, 0, 0, 0.3, 1.0]))) + wages = max(0, gross - transfers - self_emp) + taxes = int(round((wages + self_emp) * r.uniform(0.18, 0.34))) + y = wages + self_emp + transfers - taxes + row.update(wages=wages, self_employment_income=self_emp, pensions_and_benefits=transfers, taxes_paid=taxes) + if d == 3: row.update(members_14_or_over=m, children_under_14=c) + rows.append(row); inc.append(y); size.append(m + c); kids.append(c) + if min(inc) <= 0: continue + if d < 3: + obs = inc[:]; child = None + else: + if sum(size) % 5 or sum(kids) < 5: continue + eq = [y / equivalence_scale(row["members_14_or_over"], row["children_under_14"]) for y, row in zip(inc, rows)] + obs = [e for e, s in zip(eq, size) for _ in range(s)] + med = median(obs); line = 0.6 * med + if any(abs(x - line) / line < 0.01 for x in obs): continue # nobody on the poverty line + poor = sum(1 for x in obs if x < line) + if d >= 2 and poor == 0: continue + break + shares = quintile_shares(obs); g = gini(obs) + unit = "households" if d < 3 else "persons" + checks = [c_int(unit, len(obs)), c_num("mean_income", sum(obs) / float(len(obs)), 2), c_num("median_income", med, 2), c_num("gini", g, 4)] + for j, s in enumerate(shares): checks.append(c_num("quintile_shares_percent.Q%d" % (j + 1), s, 2)) + checks.append(c_num("s80_s20", shares[4] / shares[0], 2)) + what = "household disposable income" if d < 3 else "equivalised disposable income per person" + lines = ["- `%s`: the number of %s, an integer." % (unit, unit), + "- `mean_income` and `median_income`: of %s, 2 decimals." % what, + "- `gini`: the Gini coefficient, 4 decimals.", + "- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.", + "- `s80_s20`: the income quintile share ratio, 2 decimals."] + if d >= 2: + checks += [c_num("poverty_threshold", line, 2), c_int("%s_at_risk" % unit, poor), c_num("at_risk_of_poverty_rate_percent", 100.0 * poor / len(obs), 2)] + lines += ["- `poverty_threshold`: 60% of the median income, 2 decimals.", + "- `%s_at_risk`: the number of %s with an income strictly below the threshold, an integer." % (unit, unit), + "- `at_risk_of_poverty_rate_percent`: that number as a percentage of all %s, 2 decimals." % unit] + if d == 3: + poor_kids = sum(k for e, k in zip(eq, kids) if e < line) + checks += [c_int("children_at_risk", poor_kids), c_num("child_at_risk_rate_percent", 100.0 * poor_kids / sum(kids), 2)] + lines += ["- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.", + "- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals."] + if d == 1: + header = ["household_id", "region", "disposable_income"] + src = "`households.csv` gives the annual disposable income of %d households from a survey. Each household is one observation." % n + elif d == 2: + header = ["household_id", "region", "tenure", "wages", "self_employment_income", "pensions_and_benefits", "taxes_paid"] + src = ("`households.csv` gives the annual income components of %d households from a survey. Each household is one observation. " + "Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.") % n + else: + header = ["household_id", "region", "tenure", "members_14_or_over", "children_under_14", "wages", "self_employment_income", "pensions_and_benefits", "taxes_paid"] + src = ("`households.csv` gives the annual income components and the composition of %d households from a survey. " + "Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\n" + "Work with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. " + "Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: " + "a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).") % n + inst = """# Income distribution from a household survey + +%s + +%s + +Write `answer.json` in this folder, a JSON object with: + +%s + +%s +""" % (src, GINI_TEXT % (unit, unit), "\n".join(lines), TOL) + return Task(ENV, "income-distribution", seed, d, "Income distribution, %d households" % n, inst, + {"households.csv": to_csv(rows, header)}, checks, {"households": n}) + +# ---------------------------------------------------------------- inflation contributions +CATS = [("Food", "food"), ("Alcohol and tobacco", "other"), ("Clothing", "other"), ("Housing", "other"), ("Electricity and gas", "energy"), ("Furnishings", "other"), + ("Health", "other"), ("Transport services", "other"), ("Motor fuels", "energy"), ("Communication", "other"), ("Recreation", "other"), ("Restaurants", "other")] +TYPICAL_W = {"Food": 150, "Alcohol and tobacco": 40, "Clothing": 50, "Housing": 200, "Electricity and gas": 60, "Furnishings": 55, "Health": 45, + "Transport services": 80, "Motor fuels": 45, "Communication": 30, "Recreation": 110, "Restaurants": 80} + +def month_list(y, m, n): + out = [] + for _ in range(n): + out.append("%04d-%02d" % (y, m)); m += 1 + if m == 13: y, m = y + 1, 1 + return out + +def gen_contrib(seed, d): + r = rng_for(ENV + "/inflation-contributions", seed, d) + ncat = {1: 5, 2: 8, 3: 11}[d] + while True: + must = ["Food", "Electricity and gas", "Motor fuels"] if d == 3 else ["Food"] + rest = [c for c, _ in CATS if c not in must] + cats = must + r.sample(rest, ncat - len(must)) + group = dict(CATS) + raw = dict((c, TYPICAL_W[c] * r.uniform(0.7, 1.3)) for c in cats) + if d == 1: + w = dict((c, int(round(1000 * raw[c] / sum(raw.values())))) for c in cats) + w[cats[0]] += 1000 - sum(w.values()) + else: + scale = r.uniform(20, 400) + w = dict((c, round(raw[c] * scale / 10.0, 1)) for c in cats) + y0 = r.randint(2012, 2022); m0 = r.randint(1, 12) + months = month_list(y0, m0, 2 if d == 1 else r.randint(15, 19)) + cur = months[-1] if d == 1 else months[-r.randint(1, 3)] + comp = months[0] if d == 1 else months[months.index(cur) - 12] + wref = None if d < 3 else months[r.randint(0, months.index(comp) - 1)] if months.index(comp) > 0 else None + if d == 3 and wref is None: continue + series = {} + for c in cats: + vol = 0.035 if group[c] == "energy" else 0.012 if group[c] == "food" else 0.006 + drift = r.uniform(-0.002, 0.008) + lvl = 100.0 * r.uniform(1.0, 1.12) + if d == 1: + series[c, months[0]] = round(lvl, 2) + series[c, months[1]] = round(lvl * (1 + 12 * drift + r.gauss(0, vol * 3.5)), 2) + else: + vals = [] + for mth in months: + vals.append(lvl); lvl *= 1 + drift + r.gauss(0, vol) + if d == 3: + k = vals[months.index(wref)] + pub = r.choice([1.0, 1.0, r.uniform(0.6, 2.2), r.uniform(0.6, 2.2)]) * 100.0 / k + vals = [v * pub for v in vals] + for mth, v in zip(months, vals): series[c, mth] = round(v, 2) + def idx(mth): + if d < 3: return dict((c, series[c, mth]) for c in cats) + return dict((c, 100.0 * series[c, mth] / series[c, wref]) for c in cats) + a_s, a_t, infl, con = contributions(w, idx(comp), idx(cur)) + order = sorted(cats, key=lambda c: -con[c]) + if con[order[0]] - con[order[1]] < 0.03 or con[order[-2]] - con[order[-1]] < 0.03: continue + if abs(infl) < 0.3: continue + break + wrows = [{"category": c, "weight": w[c], "special_group": group[c]} for c in cats] + irows = [{"category": c, "month": mth, "index": "%.2f" % series[c, mth]} for c in cats for mth in months] + r.shuffle(wrows) + if d >= 2: r.shuffle(irows) + conf = {"current_month": cur, "comparison_month": comp} + if d == 3: conf["weight_reference_month"] = wref + files = {"weights.csv": to_csv(wrows, ["category", "weight", "special_group"] if d == 3 else ["category", "weight"]), + "indices.csv": to_csv(irows, ["category", "month", "index"]), "request.json": to_json(conf)} + checks = [c_num("all_items_index.%s" % comp, a_s, 2), c_num("all_items_index.%s" % cur, a_t, 2), c_num("inflation_percent", infl, 2)] + for c in sorted(cats): checks.append(c_num("contributions.%s" % c, con[c], 3)) + checks.append(c_str("largest_contributor", order[0])) + lines = ["- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"%s\"` and `\"%s\"`), 2 decimals." % (comp, cur), + "- `inflation_percent`: the percentage change of the all-items index from %s to %s, 2 decimals." % (comp, cur), + "- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.", + "- `largest_contributor`: the category with the largest contribution."] + if d >= 2: + checks.append(c_str("smallest_contributor", order[-1])) + lines.append("- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).") + if d == 1: + wtext = "`weights.csv` gives the weight of each category in parts per thousand." + itext = "`indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to." + elif d == 2: + wtext = "`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum." + itext = "`indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to." + else: + wtext = "`weights.csv` gives each category's weight as household spending (in millions) in %s, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`." % wref + itext = ("`indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. " + "First rebase every category so that it equals 100 in %s: rebased index = 100 x published index / published index of the same category in %s. Use the rebased indices everywhere below.") % (wref, wref) + cidx = lambda mth: sum(w[c] * idx(mth)[c] for c in cats if group[c] == "other") / sum(w[c] for c in cats if group[c] == "other") + checks += [c_num("core_index.%s" % comp, cidx(comp), 2), c_num("core_index.%s" % cur, cidx(cur), 2), c_num("core_inflation_percent", (cidx(cur) / cidx(comp) - 1) * 100, 2)] + for g in ("food", "energy", "other"): checks.append(c_num("group_contributions.%s" % g, sum(con[c] for c in cats if group[c] == g), 3)) + lines += ["- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.", + "- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.", + "- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals."] + inst = """# Contributions to inflation + +%s %s + +Compare %s (the current month) with %s (the comparison month); both are named in `request.json`. This is a fixed-weight index, so: + +- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month. +- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100. +- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100. + +Write `answer.json` in this folder, a JSON object with: + +%s + +%s +""" % (wtext, itext, cur, comp, "\n".join(lines), TOL) + return Task(ENV, "inflation-contributions", seed, d, "Inflation contributions, %d categories" % ncat, inst, files, checks, {"categories": ncat}) + +FAMILIES = {"basket-indices": gen_basket, "national-accounts": gen_na, "income-distribution": gen_income, "inflation-contributions": gen_contrib} + +def generate(seed, difficulty, family=None): + fam = family or sorted(FAMILIES)[seed % len(FAMILIES)] + return FAMILIES[fam](seed, difficulty) diff --git a/envs/price_index/oracle.py b/envs/price_index/oracle.py new file mode 100644 index 0000000000000000000000000000000000000000..f4baabac2d92c084bbf4c4e153e5ecfb353e00af --- /dev/null +++ b/envs/price_index/oracle.py @@ -0,0 +1,82 @@ +"""Independent file-based solution; standard library only.""" +import csv, json, math +from pathlib import Path + +def rows(name): + with open(name) as f: return list(csv.DictReader(f)) +def load(name): return json.loads(Path(name).read_text()) +def median(x): + s=sorted(x); n=len(s) + return s[n//2] if n%2 else (s[n//2-1]+s[n//2])/2 + +def solve(): + if Path('basket.csv').exists(): + rs=rows('basket.csv'); years=sorted({r['period'] for r in rs}); names={r['item'] for r in rs} + keep=sorted(i for i in names if {r['period'] for r in rs if r['item']==i}==set(years)) + rates={(r['currency'],r['period']):float(r['crn_per_unit']) for r in rows('exchange_rates.csv')} if Path('exchange_rates.csv').exists() else {} + units={'g':.001,'kg':1,'ml':.001,'cl':.01,'litre':1,'each':1,'dozen':12} + p,q={},{} + for r in rs: + if r['item'] not in keep: continue + key=(r['period'],r['item']); pack=float(r.get('pack_size',1))*units[r.get('pack_unit','each')] + p[key]=float(r['price'])*rates.get((r.get('currency','CRN'),r['period']),1)/pack; q[key]=float(r['quantity']) + base=years[0]; out={'basket_cost':{},'indices':{}}; fish={base:100} + for y in years: + out['basket_cost'][y]=sum(p[y,i]*q[y,i] for i in keep) + if y==base: continue + l=100*sum(p[y,i]*q[base,i] for i in keep)/sum(p[base,i]*q[base,i] for i in keep) + a=100*sum(p[y,i]*q[y,i] for i in keep)/sum(p[base,i]*q[y,i] for i in keep) + fish[y]=math.sqrt(l*a); out['indices'][y]={'laspeyres':l,'paasche':a,'fisher':fish[y]} + if 'pack_size' in rs[0]: + out['excluded_items']=sorted(names-set(keep)); out['fisher_change_percent']={b:100*(fish[b]/fish[a]-1) for a,b in zip(years,years[1:])} + return out + if Path('output.csv').exists(): + rs=[r for r in rows('output.csv') if r.get('use','final')=='final']; cfg=load('accounts.json') + years=sorted({r['year'] for r in rs}); base=str(cfg['base_year']); ps={(r['year'],r['product']):float(r['unit_price']) for r in rs} + nom={y:sum(float(r['unit_price'])*float(r['quantity']) for r in rs if r['year']==y) for y in years} + real={y:sum(ps[base,r['product']]*float(r['quantity']) for r in rs if r['year']==y) for y in years} + out={'years':{y:{'nominal_gdp':nom[y],'real_gdp':real[y],'deflator':100*nom[y]/real[y]} for y in years}} + if 'reference_year' in cfg: + links={b:sum(ps[a,r['product']]*float(r['quantity']) for r in rs if r['year']==b)/nom[a] for a,b in zip(years,years[1:])} + cv={years[0]:100} + for a,b in zip(years,years[1:]): cv[b]=cv[a]*links[b] + factor=100/cv[str(cfg['reference_year'])]; cv={y:v*factor for y,v in cv.items()} + for y in years: out['years'][y]['chain_index']=cv[y] + if Path('population.csv').exists(): + pop={r['year']:int(r['population']) for r in rows('population.csv')} + for y in years: out['years'][y].update(chained_volume_gdp=nom[str(cfg['reference_year'])]*cv[y]/100,real_gdp_per_capita=real[y]/pop[y]) + for key,vals in [('average_real_growth_percent',real),('average_chain_growth_percent',cv)]: out[key]=100*((vals[years[-1]]/vals[years[0]])**(1/(len(years)-1))-1) + else: + for a,b in zip(years,years[1:]): out['years'][b].update(real_growth_percent=100*(real[b]/real[a]-1),chain_growth_percent=100*(cv[b]/cv[a]-1)) + else: + for a,b in zip(years,years[1:]): out['years'][b].update(real_growth_percent=100*(real[b]/real[a]-1),inflation_percent=100*(out['years'][b]['deflator']/out['years'][a]['deflator']-1)) + return out + if Path('households.csv').exists(): + rs=rows('households.csv'); persons='members_14_or_over' in rs[0]; obs=[]; children=[] + for r in rs: + inc=float(r['disposable_income']) if 'disposable_income' in r else sum(float(r[k]) for k in ['wages','self_employment_income','pensions_and_benefits'])-float(r['taxes_paid']) + if persons: + adults,kids=int(r['members_14_or_over']),int(r['children_under_14']); inc/=1+.5*(adults-1)+.3*kids + obs.extend([inc]*(adults+kids)); children.append((inc,kids)) + else: obs.append(inc) + obs.sort(); n=len(obs); total=sum(obs); k=n//5; shares=[100*sum(obs[j*k:(j+1)*k])/total for j in range(5)] + # Pairwise-distance Gini is independent of the generator's rank formula. + out={'persons' if persons else 'households':n,'mean_income':total/n,'median_income':median(obs),'gini':sum(abs(a-b) for a in obs for b in obs)/(2*n*total),'quintile_shares_percent':{'Q%d'%(j+1):v for j,v in enumerate(shares)},'s80_s20':shares[-1]/shares[0]} + if 'disposable_income' not in rs[0]: + line=.6*median(obs); poor=sum(x 1.96 is reliable. + Cronbach's alpha: Cronbach, L. J. (1951). Coefficient alpha and the internal structure of tests. + Psychometrika 16, 297-334. alpha = k/(k-1) * (1 - sum(item variances) / variance of totals). + T score = 50 + 10 z (McCall's T). Percentile rank from the normal distribution function + Phi(z) = 0.5 * (1 + erf(z / sqrt(2))). + Prorating a subscale with a few missing items (mean of answered items times number of items) is the + common manual rule; the 20% limit and all instruments, items, cut-offs and norms here are invented. +""" +import math +from practice.core import Task, rng_for, to_csv, c_int, c_num, c_str, c_set, clear_of + +ENV = "psychometrics" + +# ---------------------------------------------------------------- scoring +BANDS = ["minimal", "mild", "moderate", "severe"] +INSTRUMENTS = [("Mood Inventory", "MI"), ("Worry Questionnaire", "WQ"), ("Stress Checklist", "SC"), ("Daily Strain Scale", "DSS")] +SUBSCALES = {"LOW": "Low mood", "TEN": "Tension", "SLP": "Sleep", "SOC": "Social withdrawal", "CON": "Concentration", "ENE": "Energy"} + +def score_subscale(resp, items, reverse, max_resp): + """resp: dict item number -> response (int) or None if missing. + Returns the subscale score (int), prorated and rounded half up when some items are missing, + or None if more than 20% of the subscale's items are missing.""" + got = [(max_resp - resp[i]) if i in reverse else resp[i] for i in items if resp.get(i) is not None] + k, a = len(items), len(got) + if 5 * (k - a) > k: return None + s = sum(got) + if a == k: return s + return (2 * s * k + a) // (2 * a) # s * k / a, rounded half up, in exact integer arithmetic + +def band_of(total, cuts): + """cuts: the lowest totals of mild, moderate and severe.""" + return BANDS[sum(1 for c in cuts if total >= c)] + +def score_client(resp, subs, reverse, max_resp, cuts): + """Returns (dict code -> score or None, total or None, band or None).""" + sc = dict((code, score_subscale(resp, items, reverse, max_resp)) for code, items in subs) + if any(v is None for v in sc.values()): return sc, None, None + total = sum(sc.values()) + return sc, total, band_of(total, cuts) + +def manual_text(name, code, k, max_resp, reverse, subs, cuts, d, crit): + L = ["# %s (%s-%d): scoring manual" % (name, code, k), "", + "The %s is an invented questionnaire used for practice. It has %d items, numbered 1 to %d." % (name, k, k), + "Each item is answered on a scale from 0 to %d. Higher scores mean more difficulties." % max_resp, "", + "## Reverse-keyed items", "", + "Reverse-keyed items: %s." % ", ".join(str(i) for i in sorted(reverse)), "", + "For a reverse-keyed item the item score is %d minus the response. For every other item the item score is the response." % max_resp, "", + "## Subscales", "", "| Subscale | Code | Items |", "|---|---|---|"] + for c, items in subs: + L.append("| %s | %s | %s |" % (SUBSCALES[c], c, ", ".join(str(i) for i in items))) + L += ["", "A subscale score is the sum of the item scores of its items."] + if d >= 2: + L += ["", "## Missing responses", "", + "An empty cell means the item was not answered." + (" The code 9 also means the item was not answered." if d >= 3 else ""), "", + "- If no item of a subscale is missing, the subscale score is the plain sum.", + "- If some items are missing, but at most 20% of the subscale's items, prorate: add up the item scores of the answered items, multiply by the number of items in the subscale, divide by the number of answered items, and round to a whole number (round half up).", + "- If more than 20% of the subscale's items are missing, the subscale is not scorable.", + "- If any subscale is not scorable, the total score and the severity band are not scorable either."] + L += ["", "## Total score and severity band", "", + "The total score is the sum of the subscale scores%s." % (" (prorated scores where prorating was needed)" if d >= 2 else ""), "", + "| Band | Total score |", "|---|---|"] + lows = [0] + cuts; highs = [c - 1 for c in cuts] + [k * max_resp] + for b, lo, hi in zip(BANDS, lows, highs): + L.append("| %s | %d to %d |" % (b, lo, hi)) + if crit: + L += ["", "## Risk item", "", + "Item %d is the risk item. Flag a client whose response to it, as answered, is 2 or more. A client who did not answer the risk item is not flagged." % crit] + return "\n".join(L) + "\n" + +def gen_scoring(seed, d): + r = rng_for(ENV + "/scoring", seed, d) + k, max_resp, n = {1: (12, 3, 5), 2: (20, 3, 7), 3: (24, 4, 7)}[d] + sizes = list(r.choice({1: [[6, 6]], 2: [[5, 5, 10], [4, 6, 10], [5, 7, 8]], 3: [[4, 5, 5, 10], [5, 5, 6, 8], [4, 6, 7, 7]]}[d])) + r.shuffle(sizes) + name, code = r.choice(INSTRUMENTS) + order = list(range(1, k + 1)); r.shuffle(order) + subs, pos = [], 0 + for c, s in zip(r.sample(sorted(SUBSCALES), len(sizes)), sizes): + subs.append((c, sorted(order[pos:pos + s]))); pos += s + reverse = set(r.sample(range(1, k + 1), k // 4)) + crit = r.choice([i for i in range(1, k + 1) if i not in reverse]) if d >= 3 else None + cuts = [int(k * max_resp * f) + r.randint(-1, 1) for f in (0.25, 0.45, 0.65)] + cids = ["C%03d" % i for i in r.sample(range(101, 400), n)] + clinicians = ["AB", "KL", "MN", "RS"] + + def response_set(sev, allow_missing): + resp = {} + for i in range(1, k + 1): + v = min(max_resp, max(0, int(round(sev * max_resp + r.gauss(0, 0.8))))) + resp[i] = (max_resp - v) if i in reverse else v + if allow_missing: + p = r.random() + m = 0 if p < 0.35 else 1 if p < 0.7 else 2 if p < 0.88 else r.randint(3, 4) + for i in r.sample(range(1, k + 1), m): resp[i] = None + return resp + + while True: + latest, rows = {}, [] + for c in cids: + sev = r.choice([0.1, 0.25, 0.4, 0.55, 0.7, 0.85]) + dates = ["2025-%02d-%02d" % (r.randint(6, 11), r.randint(1, 28))] + if d >= 3 and r.random() < 0.45: + dates.append("2025-%02d-%02d" % (r.randint(1, 5), r.randint(1, 28))) # an earlier administration + for j, date in enumerate(dates): + resp = response_set(sev if j == 0 else r.choice([0.25, 0.55, 0.85]), d >= 2) + if j == 0: latest[c] = resp + row = {"client_id": c, "administered": date, "clinician": r.choice(clinicians)} + for i in range(1, k + 1): + row["item_%02d" % i] = (r.choice(["", "9"]) if d >= 3 else "") if resp[i] is None else resp[i] + rows.append(row) + res = dict((c, score_client(latest[c], subs, reverse, max_resp, cuts)) for c in cids) + if d == 1: break + prorated = half = 0 + for c in cids: + for sc_code, items in subs: + a = [i for i in items if latest[c][i] is not None] + if len(a) < len(items) and res[c][0][sc_code] is not None: + prorated += 1 + s = sum((max_resp - latest[c][i]) if i in reverse else latest[c][i] for i in a) + if (2 * s * len(items)) % len(a) == 0 and (s * len(items)) % len(a) != 0: half += 1 # exactly .5: avoid + n_bad = sum(1 for c in cids if res[c][1] is None) + if half or prorated < 2 or not 1 <= n_bad <= 2: continue + if d >= 3: + flagged = [c for c in cids if latest[c][crit] is not None and latest[c][crit] >= 2] + if not 1 <= len(flagged) < n or len(rows) == n: continue + break + r.shuffle(rows) + header = ["client_id", "administered", "clinician"] + ["item_%02d" % i for i in range(1, k + 1)] + checks, unscorable = [], [] + for c in sorted(cids): + sc, total, band = res[c] + for sc_code, _ in subs: + if sc[sc_code] is None: unscorable.append("%s:%s" % (c, sc_code)) + else: checks.append(c_int("clients.%s.subscales.%s" % (c, sc_code), sc[sc_code])) + if total is not None: + checks += [c_int("clients.%s.total" % c, total), c_str("clients.%s.band" % c, band)] + checks.append(c_set("moderate_or_severe", [c for c in cids if res[c][2] in ("moderate", "severe")], weight=2)) + lines = ["- `clients`: an object keyed by client id. Each value has", + " - `subscales`: an object keyed by subscale code, giving each subscale score as an integer%s" % (". Leave out a subscale that is not scorable." if d >= 2 else "."), + " - `total`: the total score, an integer%s" % (". Leave it out if it is not scorable." if d >= 2 else "."), + " - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`%s" % (". Leave it out if the total is not scorable." if d >= 2 else "."), + "- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none)."] + if d >= 2: + checks.append(c_set("unscorable", unscorable, weight=2)) + lines.append('- `unscorable`: list of strings of the form `":"`, one for every subscale that is not scorable (any order; an empty list if none).') + if d >= 3: + checks.append(c_set("risk_flagged", [c for c in cids if latest[c][crit] is not None and latest[c][crit] >= 2], weight=2)) + lines.append("- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none).") + which = " Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date)." if d >= 3 else "" + inst = """# Questionnaire scoring: %s + +`responses.csv` holds the item responses of %d clients to the %s, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.%s + +Write `answer.json` in this folder, a JSON object with: + +%s +""" % (name, n, name, which, "\n".join(lines)) + return Task(ENV, "scoring", seed, d, "Score the %s for %d clients" % (name, n), inst, + {"responses.csv": to_csv(rows, header), "scoring_manual.md": manual_text(name, code, k, max_resp, reverse, subs, cuts, d, crit)}, + checks, {"clients": n, "items": k}) + +# ---------------------------------------------------------------- reliable change +def s_diff(sd, rel): + """Standard error of the difference between two scores (Jacobson & Truax 1991).""" + return sd * math.sqrt(2.0) * math.sqrt(1.0 - rel) + +def rci(pre, post, sd, rel): + return (post - pre) / s_diff(sd, rel) + +def classify(pre, post, sd, rel, cutoff, direction="higher_is_worse"): + x = rci(pre, post, sd, rel) + if abs(x) <= 1.96: return "unchanged" + if direction == "higher_is_worse": + if x > 0: return "deteriorated" + return "recovered" if (pre >= cutoff and post < cutoff) else "improved" + if x < 0: return "deteriorated" + return "recovered" if (pre <= cutoff and post > cutoff) else "improved" + +RC_INSTR = [("MI", "Mood Inventory", 36, "higher_is_worse"), ("WQ", "Worry Questionnaire", 48, "higher_is_worse"), + ("SC", "Stress Checklist", 40, "higher_is_worse"), ("SLQ", "Sleep Problems Questionnaire", 30, "higher_is_worse"), + ("WBS", "Wellbeing Scale", 50, "higher_is_better"), ("DFS", "Daily Functioning Scale", 60, "higher_is_better")] + +def rci_rules(d): + t = """# Reliable and clinically significant change + +These rules follow Jacobson and Truax (1991). The instruments are invented for practice. + +## Reliable change index + +For one client on one instrument: + + S_diff = SD * sqrt(2) * sqrt(1 - r) + RCI = (post - pre) / S_diff + +`SD` is the instrument's standard deviation and `r` its reliability, both from `instruments.csv`. `pre` is the score before treatment and `post` the score after it. Keep the sign: the RCI is negative when the score went down. + +The change is **reliable** when the RCI is above 1.96 or below -1.96. Otherwise it is not reliable. + +## Clinical range + +""" + if d >= 3: + t += """The `direction` column of `instruments.csv` says how to read the scores. + +- `higher_is_worse`: a score at or above `clinical_cutoff` is in the clinical range; a score below it is not. A lower score after treatment is an improvement. +- `higher_is_better`: a score at or below `clinical_cutoff` is in the clinical range; a score above it is not. A higher score after treatment is an improvement. +""" + else: + t += """On every instrument here a higher score means more difficulties. A score at or above `clinical_cutoff` is in the clinical range; a score below it is not. A lower score after treatment is an improvement. +""" + t += """ +## Status + +- `recovered`: the change is reliable, it is an improvement, the pre score was in the clinical range and the post score is not. +- `improved`: the change is reliable and an improvement, but the client is not `recovered` (the pre score was already outside the clinical range, or the post score is still inside it). +- `unchanged`: the change is not reliable. +- `deteriorated`: the change is reliable and in the direction of getting worse. +""" + return t + +def gen_rci(seed, d): + r = rng_for(ENV + "/reliable-change", seed, d) + n_inst, n_cli = {1: (1, 6), 2: (2, 8), 3: (3, 6)}[d] + worse = [x for x in RC_INSTR if x[3] == "higher_is_worse"]; better = [x for x in RC_INSTR if x[3] == "higher_is_better"] + if d >= 3: used = r.sample(worse, 2) + [r.choice(better)] + else: used = r.sample(worse, n_inst) + extra = [x for x in RC_INSTR if x not in used] + listed = used + ([r.choice([x for x in extra if d >= 3 or x[3] == "higher_is_worse"])] if d >= 2 else []) + par = {} + for code, name, hi, direction in listed: + par[code] = {"sd": r.randint(50, 90) / 10.0, "rel": r.randint(75, 92) / 100.0, "cut": int(hi * r.choice([0.4, 0.45, 0.5])), "hi": hi, "dir": direction} + cids = ["C%03d" % i for i in r.sample(range(101, 400), n_cli)] + while True: + rows, res = [], {} + for c in cids: + for code, name, hi, direction in used: + p = par[code]; sdf = s_diff(p["sd"], p["rel"]); sign = -1 if direction == "higher_is_worse" else 1 + while True: + clinical = r.random() < 0.75 + if (direction == "higher_is_worse") == clinical: pre = r.randint(p["cut"], hi - 2) + else: pre = r.randint(2, p["cut"] - 1) + mode = r.random() + if mode < 0.5: delta = sign * r.uniform(2.3, 4.5) * sdf + elif mode < 0.8: delta = r.uniform(-1.5, 1.5) * sdf + else: delta = -sign * r.uniform(2.3, 4.0) * sdf + post = int(round(pre + delta)) + if not 0 <= post <= hi: continue + if clear_of(abs(rci(pre, post, p["sd"], p["rel"])), [1.96], 0.15): break + rows.append({"client_id": c, "instrument": code, "pre_score": pre, "post_score": post, + "sessions": r.randint(6, 20), "therapist": r.choice(["T1", "T2", "T3"])}) + res[(c, code)] = (rci(pre, post, p["sd"], p["rel"]), classify(pre, post, p["sd"], p["rel"], p["cut"], direction)) + if d >= 2: + for row in r.sample(rows, r.randint(1, 2)): + row["post_score"] = ""; row["sessions"] = r.randint(1, 4); del res[(row["client_id"], row["instrument"])] + st = [v[1] for v in res.values()] + if len(set(st)) >= (3 if d == 1 else 4) and "recovered" in st and "improved" in st: break + r.shuffle(rows) + irows = [] + for code, name, hi, direction in listed: + p = par[code] + row = {"code": code, "name": name, "items": hi // r.choice([3, 4]), "score_range": "0-%d" % hi, "sd": "%.1f" % p["sd"], + "reliability": "%.2f" % p["rel"], "clinical_cutoff": p["cut"], "direction": direction} + irows.append(row) + r.shuffle(irows) + ih = ["code", "name", "items", "score_range", "sd", "reliability", "clinical_cutoff"] + (["direction"] if d >= 3 else []) + checks, nopost = [], [] + for code, _, _, _ in used: + checks.append(c_num("instruments.%s.s_diff" % code, s_diff(par[code]["sd"], par[code]["rel"]), 2)) + for c in sorted(cids): + for code, _, _, _ in used: + if (c, code) not in res: nopost.append("%s:%s" % (c, code)); continue + checks += [c_num("results.%s.%s.rci" % (c, code), res[(c, code)][0], 2), c_str("results.%s.%s.status" % (c, code), res[(c, code)][1])] + for key in ("recovered", "deteriorated"): + checks.append(c_set(key, ["%s:%s" % k for k in sorted(res) if res[k][1] == key], weight=2)) + lines = ["- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has", + " - `s_diff`: the standard error of the difference, 2 decimals.", + "- `results`: an object keyed by client id, then by instrument code. Each value has", + " - `rci`: the reliable change index, 2 decimals, with its sign.", + " - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.", + '- `recovered`: list of strings of the form `":"` for every result with status `recovered` (any order; an empty list if none).', + "- `deteriorated`: the same for status `deteriorated`."] + note = "" + if d >= 2: + checks.append(c_set("no_post", nopost, weight=2)) + note = " Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`." + lines.append('- `no_post`: list of `":"` strings for the rows without a post score (any order).') + if d >= 3: + for code, _, _, _ in used: + done = [k for k in res if k[1] == code] + checks.append(c_num("instruments.%s.recovered_pct" % code, 100.0 * sum(1 for k in done if res[k][1] == "recovered") / len(done), 1)) + lines.insert(2, " - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.") + inst = """# Outcome review: reliable change + +`outcomes.csv` holds pre-treatment and post-treatment scores for %d clients on %s, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.%s + +Write `answer.json` in this folder, a JSON object with: + +%s + +Numbers are accepted within one unit of the last decimal place asked for. +""" % (n_cli, "one instrument" if n_inst == 1 else "%d instruments" % n_inst, note, "\n".join(lines)) + return Task(ENV, "reliable-change", seed, d, "Reliable change for %d clients" % n_cli, inst, + {"outcomes.csv": to_csv(rows, ["client_id", "instrument", "pre_score", "post_score", "sessions", "therapist"]), + "instruments.csv": to_csv(irows, ih), "rci_rules.md": rci_rules(d)}, checks, {"clients": n_cli, "instruments": n_inst}) + +# ---------------------------------------------------------------- norms +def z_score(raw, mean, sd): return (raw - mean) / float(sd) +def t_score(z): return 50.0 + 10.0 * z +def percentile(z): return 100.0 * 0.5 * (1.0 + math.erf(z / math.sqrt(2.0))) +def age_on(birth, test): + """Completed years of age on the test date. birth and test are (year, month, day).""" + return test[0] - birth[0] - (1 if (test[1], test[2]) < (birth[1], birth[2]) else 0) +def t_range(t): return "very-high" if t >= 70 else "high" if t >= 60 else "average" if t >= 40 else "low" + +AGE_BANDS = [(18, 29), (30, 44), (45, 59), (60, 74)] +NORM_SCALES = [("ATT", "Attention Difficulties Scale"), ("WDR", "Withdrawal Scale"), ("IRR", "Irritability Scale"), ("FAT", "Fatigue Scale")] + +def band_for(age): + for lo, hi in AGE_BANDS: + if lo <= age <= hi: return "%d-%d" % (lo, hi) + return None + +def norms_guide(d): + t = """# Using the norm table + +The scales and norms are invented for practice. + +`norms.csv` gives the mean and standard deviation (SD) of the raw score in each norm group. A norm group is a%s age band and a sex. The age bands are inclusive: `30-44` covers ages 30 to 44. +%s +For a client with raw score `x` in a norm group with mean `M` and standard deviation `SD`: + + z = (x - M) / SD + T score = 50 + 10 * z + percentile = 100 * Phi(z), Phi(z) = 0.5 * (1 + erf(z / sqrt(2))) + +`erf` is the error function (`math.erf` in Python). Use the unrounded z in the T score and the percentile. +""" % (" scale, an" if d >= 3 else "n", + "" if d == 1 else "\nAge is the client's age in completed years on the test date (the number of birthdays the client has had by that date, counting a birthday on the test date itself). A client whose age falls outside every age band has no norm group and cannot be converted.\n") + if d >= 3: + t += """ +## Ranges + +Classify the unrounded T score: + +| Range | T score | +|---|---| +| `very-high` | 70 or more | +| `high` | 60 or more, but under 70 | +| `average` | 40 or more, but under 60 | +| `low` | under 40 | +""" + return t + +def gen_norms(seed, d): + r = rng_for(ENV + "/norms", seed, d) + n_in, n_out, n_sc = {1: (6, 0, 1), 2: (6, 2, 1), 3: (4, 1, 2)}[d] + scales = r.sample(NORM_SCALES, n_sc) + listed = scales + ([r.choice([s for s in NORM_SCALES if s not in scales])] if d >= 3 else []) + norms, nrows = {}, [] + for code, name in listed: + base = r.uniform(14, 30) + for bi, (lo, hi) in enumerate(AGE_BANDS): + for sex in ("F", "M"): + m = round(base + r.uniform(-1.5, 1.5) * (bi + 1) + (1.2 if sex == "F" else 0), 1); sd = round(r.uniform(4.0, 8.5), 1) + norms[(code, "%d-%d" % (lo, hi), sex)] = (m, sd) + nrows.append({"scale": code, "scale_name": name, "age_band": "%d-%d" % (lo, hi), "sex": sex, "n": r.randint(120, 900), "mean": "%.1f" % m, "sd": "%.1f" % sd}) + r.shuffle(nrows) + cids = ["C%03d" % i for i in r.sample(range(101, 400), n_in + n_out)] + r_out = set(r.sample(cids, n_out)) + crows, checks, nogroup, elevated = [], [], [], [] + tricky = r.choice([c for c in cids if c not in r_out]) if d >= 2 else None + for c in cids: + sex = r.choice("FM") + test = (2025, r.randint(2, 11), r.randint(1, 28)) + if c in r_out: age = r.choice([15, 16, 17, 75, 76, 79, 82]) + elif c == tricky: age = r.choice([29, 44, 59]) # the birthday falls just after the test date + else: age = r.randint(18, 74) + if d == 1: birth = None + elif c == tricky: + bm, bd = test[1], test[2] + r.randint(1, 3) + if bd > 28: bm, bd = bm + 1, bd - 28 + birth = (test[0] - age - 1, bm, bd) + else: + while True: + bm, bd = r.randint(1, 12), r.randint(1, 28) + birth = (test[0] - age - (1 if (test[1], test[2]) < (bm, bd) else 0), bm, bd) + if (bm, bd) != (test[1], test[2]) or r.random() < 0.3: break + if birth is not None: assert age_on(birth, test) == age + band = band_for(age) + if band is None: nogroup.append(c) + elif d >= 2: checks.append(c_int("clients.%s.age" % c, age)) + for code, name in scales: + m, sd = norms[(code, band or "18-29", sex)] + while True: + raw = int(round(m + r.choice([-1.4, -0.6, 0, 0.5, 1.1, 1.6, 2.3]) * sd + r.uniform(-0.5, 0.5) * sd)) + if raw < 0: continue + z = z_score(raw, m, sd) + if d < 3 or clear_of(t_score(z), [40, 60, 70], 0.3): break + row = {"client_id": c, "sex": sex, "scale": code, "raw_score": raw, "referral": r.choice(["GP", "self", "occupational health"])} + if d == 1: row["age"] = age + else: + row["date_of_birth"] = "%04d-%02d-%02d" % birth; row["test_date"] = "%04d-%02d-%02d" % test + crows.append(row) + if band is None: continue + pre = "clients.%s.scales.%s." % (c, code) if d >= 3 else "clients.%s." % c + checks += [c_num(pre + "z", z, 2), c_num(pre + "t_score", t_score(z), 1), c_num(pre + "percentile", percentile(z), 1)] + if d >= 3: + checks.append(c_str(pre + "range", t_range(t_score(z)))) + if t_score(z) >= 60: elevated.append("%s:%s" % (c, code)) + r.shuffle(crows) + ch = ["client_id", "sex"] + (["age"] if d == 1 else ["date_of_birth", "test_date"]) + (["scale"] if d >= 3 else []) + ["raw_score", "referral"] + per = ["`z`: the z score, 2 decimals.", "`t_score`: the T score, 1 decimal.", "`percentile`: the percentile rank, 1 decimal."] + if d >= 3: per.append("`range`: one of `very-high`, `high`, `average`, `low`.") + if d >= 3: + lines = ["- `clients`: an object keyed by client id, for every client who has a norm group. Each value has", + " - `age`: age in completed years on the test date, an integer.", + " - `scales`: an object keyed by scale code, each with"] + [" - " + p for p in per] + else: + lines = ["- `clients`: an object keyed by client id%s. Each value has" % (", for every client who has a norm group" if d >= 2 else "")] + if d >= 2: lines.append(" - `age`: age in completed years on the test date, an integer.") + lines += [" - " + p for p in per] + if d >= 2: + checks.append(c_set("no_norm_group", nogroup, weight=2)) + lines.append("- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.") + if d >= 3: + checks.append(c_set("high_or_above", elevated, weight=2)) + lines.append('- `high_or_above`: list of strings of the form `":"` for every score in the `high` or `very-high` range (any order; an empty list if none).') + what = "the %s" % scales[0][1] if n_sc == 1 else "%d scales" % n_sc + inst = """# Norm-referenced scores + +`clients.csv` holds raw scores on %s%s. `norms.csv` is the norm table and `norms_guide.md` says how to use it.%s + +Convert every raw score using the norm group that matches the client's%s age and sex. + +Write `answer.json` in this folder, a JSON object with: + +%s + +Numbers are accepted within one unit of the last decimal place asked for. +""" % (what, " (one row per client and scale)" if d >= 3 else "", + " The norm table also lists a scale that nobody here took." if d >= 3 else "", + " scale," if d >= 3 else "", "\n".join(lines)) + files = {"clients.csv": to_csv(crows, ch), "norms.csv": to_csv(nrows, ["scale", "scale_name", "age_band", "sex", "n", "mean", "sd"]), "norms_guide.md": norms_guide(d)} + return Task(ENV, "norms", seed, d, "Norm-referenced scores for %d clients" % len(cids), inst, files, checks, {"clients": len(cids), "scales": n_sc}) + +# ---------------------------------------------------------------- reliability +def mean(xs): return sum(xs) / float(len(xs)) +def var_s(xs): + """Sample variance (n - 1 in the denominator).""" + m = mean(xs) + return sum((x - m) ** 2 for x in xs) / (len(xs) - 1.0) +def pearson(xs, ys): + mx, my = mean(xs), mean(ys) + sxy = sum((x - mx) * (y - my) for x, y in zip(xs, ys)) + return sxy / math.sqrt(sum((x - mx) ** 2 for x in xs) * sum((y - my) ** 2 for y in ys)) +def cronbach_alpha(rows): + """rows: one list of item scores per respondent (already reverse-scored, complete cases).""" + k = len(rows[0]) + item_var = sum(var_s([row[j] for row in rows]) for j in range(k)) + return k / (k - 1.0) * (1.0 - item_var / var_s([sum(row) for row in rows])) +def item_rest_r(rows, j): + """Corrected item-total correlation: item j against the sum of the other items.""" + return pearson([row[j] for row in rows], [sum(row) - row[j] for row in rows]) +def alpha_if_deleted(rows, j): + return cronbach_alpha([row[:j] + row[j + 1:] for row in rows]) + +def reliability_notes(d, reverse, k): + t = """# Reliability analysis: definitions + +The scale is invented for practice. Every item is answered from 1 to 5. +""" + if d >= 2: + t += "\nReverse-keyed items: %s. For these the item score is 6 minus the response. Reverse them first; every figure below is computed from item scores.\n" % ", ".join("q%d" % (j + 1) for j in sorted(reverse)) + if d >= 3: + t += "\nA respondent with one or more empty cells is left out of the whole analysis (listwise deletion).\n" + t += """ +With `k` items and `n` respondents: + +- The variance of a set of `n` values is the sample variance: the sum of squared deviations from the mean, divided by `n - 1`. +- A respondent's total is the sum of the `k` item scores. +- Cronbach's alpha: + + alpha = k / (k - 1) * (1 - (sum of the k item variances) / (variance of the totals)) +""" + if d >= 2: + t += """- The corrected item-total correlation of an item is the Pearson correlation, across respondents, between that item's score and the sum of the other `k - 1` item scores (the total without that item). +- An item is weak if its corrected item-total correlation is below 0.30. +""" + if d >= 3: + t += "- Alpha if item deleted is Cronbach's alpha computed on the other `k - 1` items only (so with `k - 1` in place of `k` everywhere).\n" + return t + +def gen_reliability(seed, d): + r = rng_for(ENV + "/reliability", seed, d) + k, n = {1: (5, 12), 2: (7, 24), 3: (8, 30)}[d] + scale = r.choice(["Work Engagement Scale", "Study Motivation Scale", "Social Confidence Scale", "Everyday Coping Scale"]) + while True: + reverse = set(r.sample(range(k), 2)) if d >= 2 else set() + load = [r.uniform(0.6, 1.0) for _ in range(k)] + if d >= 2: load[r.randrange(k)] = r.uniform(-0.05, 0.12) # one item that does not belong + if d >= 3 and r.random() < 0.5: load[r.randrange(k)] = r.uniform(0.2, 0.35) + scored, raw = [], [] + n_missing = r.randint(3, 5) if d >= 3 else 0 + for i in range(n + n_missing): + th = r.gauss(0, 1) + row = [min(5, max(1, int(round(3 + load[j] * th + r.gauss(0, 0.8))))) for j in range(k)] + rr = [(6 - v) if j in reverse else v for j, v in enumerate(row)] + if i >= n: + for j in r.sample(range(k), r.choice([1, 1, 2])): rr[j] = "" + else: scored.append(row) + raw.append(rr) + cols = [[row[j] for row in scored] for j in range(k)] + if min(var_s(c) for c in cols) < 0.25: continue + alpha = cronbach_alpha(scored) + if not 0.3 < alpha < 0.95: continue + rs = [item_rest_r(scored, j) for j in range(k)] + if d >= 2 and not all(clear_of(x, [0.30], 0.03) for x in rs): continue + aid = [alpha_if_deleted(scored, j) for j in range(k)] + top = sorted(aid, reverse=True) + if d >= 3 and top[0] - top[1] < 0.01: continue + break + ids = ["R%03d" % i for i in r.sample(range(1, 500), len(raw))] + rows = [] + for rid, rr in zip(ids, raw): + row = {"respondent_id": rid, "site": r.choice(["north", "south", "east"])} + for j in range(k): row["q%d" % (j + 1)] = rr[j] + rows.append(row) + r.shuffle(rows) + checks = [] + for j in range(k): + q = "q%d" % (j + 1) + if d == 1: checks.append(c_num("items.%s.mean" % q, mean(cols[j]), 2)) + checks.append(c_num("items.%s.variance" % q, var_s(cols[j]), 3)) + if d >= 2: checks.append(c_num("items.%s.item_rest_r" % q, rs[j], 3)) + if d >= 3: checks.append(c_num("items.%s.alpha_if_deleted" % q, aid[j], 3)) + checks += [c_num("total_variance", var_s([sum(row) for row in scored]), 3), c_num("alpha", alpha, 3, weight=2)] + lines = ["- `items`: an object keyed by item name (`q1` to `q%d`). Each value has" % k] + if d == 1: lines.append(" - `mean`: the mean of the item, 2 decimals.") + lines.append(" - `variance`: the variance of the item scores, 3 decimals.") + if d >= 2: lines.append(" - `item_rest_r`: the corrected item-total correlation, 3 decimals.") + if d >= 3: lines.append(" - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.") + lines += ["- `total_variance`: the variance of the respondents' totals, 3 decimals.", "- `alpha`: Cronbach's alpha of the %d-item scale, 3 decimals." % k] + if d >= 2: + checks.append(c_set("weak_items", ["q%d" % (j + 1) for j in range(k) if rs[j] < 0.30], weight=2)) + lines.append("- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).") + if d >= 3: + best = aid.index(top[0]) + checks += [c_int("n_used", n), c_str("best_item_to_drop", "q%d" % (best + 1), weight=2), c_num("alpha_gain", top[0] - alpha, 3)] + lines += ["- `n_used`: the number of respondents kept in the analysis, an integer.", + "- `best_item_to_drop`: the item with the highest alpha if item deleted.", + "- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha)."] + inst = """# Reliability of a scale + +`item_responses.csv` holds the responses of %d people to the %d items of the %s, one row per respondent. `reliability_notes.md` gives the definitions to use%s. + +Write `answer.json` in this folder, a JSON object with: + +%s + +Numbers are accepted within one unit of the last decimal place asked for. +""" % (len(raw), k, scale, "" if d == 1 else ", including which items are reverse-keyed" + (" and what to do with incomplete rows" if d >= 3 else ""), "\n".join(lines)) + return Task(ENV, "reliability", seed, d, "Reliability of a %d-item scale" % k, inst, + {"item_responses.csv": to_csv(rows, ["respondent_id", "site"] + ["q%d" % (j + 1) for j in range(k)]), + "reliability_notes.md": reliability_notes(d, reverse, k)}, checks, {"items": k, "respondents": len(raw)}) + +FAMILIES = {"scoring": gen_scoring, "reliable-change": gen_rci, "norms": gen_norms, "reliability": gen_reliability} + +def generate(seed, difficulty, family=None): + fam = family or sorted(FAMILIES)[seed % len(FAMILIES)] + return FAMILIES[fam](seed, difficulty) diff --git a/envs/psychometrics/oracle.py b/envs/psychometrics/oracle.py new file mode 100644 index 0000000000000000000000000000000000000000..a42c8eaee6418eabd1016cf7b6e80ed5d79bbe63 --- /dev/null +++ b/envs/psychometrics/oracle.py @@ -0,0 +1,170 @@ +#!/usr/bin/env python3 +"""Reference solution for Psychometrics. Works only from the files in the current directory.""" +import csv, json, math, os, re +from decimal import Decimal, ROUND_HALF_UP +from fractions import Fraction + +def rows(name): + with open(name, newline="") as f: return list(csv.DictReader(f)) + +def text(name): + with open(name) as f: return f.read() + +def nums(s): return [int(x) for x in re.findall(r"\d+", s)] + +# ---------------------------------------------------------------- scoring +def scoring(): + man = text("scoring_manual.md") + top = int(re.search(r"scale from 0 to (\d+)", man).group(1)) + reverse = set(nums(re.search(r"^Reverse-keyed items:(.*)$", man, re.M).group(1))) + subs, bands = [], [] + for line in man.splitlines(): + cells = [c.strip() for c in line.strip().strip("|").split("|")] + if len(cells) == 3 and re.match(r"^[A-Z]{3}$", cells[1]): subs.append((cells[1], nums(cells[2]))) + if len(cells) == 2 and re.match(r"^\d+ to \d+$", cells[1]): bands.append((cells[0], nums(cells[1]))) + missing_codes = {""} + if "code 9" in man: missing_codes.add("9") + m = re.search(r"Item (\d+) is the risk item", man) + risk = int(m.group(1)) if m else None + latest = {} + for r in rows("responses.csv"): + if r["client_id"] not in latest or r["administered"] > latest[r["client_id"]]["administered"]: latest[r["client_id"]] = r + ans = {"clients": {}, "moderate_or_severe": [], "unscorable": [], "risk_flagged": []} + for cid, r in latest.items(): + out = {"subscales": {}} + ok = True + for code, items in subs: + vals = [] + for i in items: + cell = r["item_%02d" % i].strip() + if cell in missing_codes: continue + v = int(cell) + vals.append(top - v if i in reverse else v) + n_miss = len(items) - len(vals) + if Fraction(n_miss, len(items)) > Fraction(20, 100): + ok = False; ans["unscorable"].append("%s:%s" % (cid, code)); continue + if n_miss == 0: out["subscales"][code] = sum(vals) + else: + pro = Decimal(sum(vals)) * Decimal(len(items)) / Decimal(len(vals)) + out["subscales"][code] = int(pro.quantize(Decimal(1), rounding=ROUND_HALF_UP)) + if ok: + total = sum(out["subscales"].values()) + out["total"] = total + for name, (lo, hi) in bands: + if lo <= total <= hi: out["band"] = name + if out["band"] in ("moderate", "severe"): ans["moderate_or_severe"].append(cid) + if risk is not None: + cell = r["item_%02d" % risk].strip() + if cell not in missing_codes and int(cell) >= 2: ans["risk_flagged"].append(cid) + ans["clients"][cid] = out + return ans + +# ---------------------------------------------------------------- reliable change +def reliable_change(): + inst = dict((r["code"], r) for r in rows("instruments.csv")) + ans = {"instruments": {}, "results": {}, "recovered": [], "deteriorated": [], "no_post": []} + counts = {} + for r in rows("outcomes.csv"): + code, cid = r["instrument"], r["client_id"] + i = inst[code] + se = float(i["sd"]) * math.sqrt(1 - float(i["reliability"])) + sdiff = math.sqrt(2 * se * se) + ans["instruments"].setdefault(code, {})["s_diff"] = round(sdiff, 2) + if r["post_score"].strip() == "": + ans["no_post"].append("%s:%s" % (cid, code)); continue + pre, post, cut = float(r["pre_score"]), float(r["post_score"]), float(i["clinical_cutoff"]) + x = (post - pre) / sdiff + up_is_bad = i.get("direction", "higher_is_worse") == "higher_is_worse" + if up_is_bad: pre_clin, post_clin, better = pre >= cut, post >= cut, post < pre + else: pre_clin, post_clin, better = pre <= cut, post <= cut, post > pre + if not (x > 1.96 or x < -1.96): status = "unchanged" + elif not better: status = "deteriorated" + elif pre_clin and not post_clin: status = "recovered" + else: status = "improved" + ans["results"].setdefault(cid, {})[code] = {"rci": round(x, 2), "status": status} + if status in ("recovered", "deteriorated"): ans[status].append("%s:%s" % (cid, code)) + c = counts.setdefault(code, [0, 0]); c[0] += 1; c[1] += status == "recovered" + for code, (n, rec) in counts.items(): + ans["instruments"][code]["recovered_pct"] = round(100.0 * rec / n, 1) + return ans + +# ---------------------------------------------------------------- norms +def norms(): + table = {} + for r in rows("norms.csv"): + lo, hi = r["age_band"].split("-") + table.setdefault((r["scale"], r["sex"]), []).append((int(lo), int(hi), float(r["mean"]), float(r["sd"]))) + only_scale = sorted(set(k[0] for k in table))[0] + guide = text("norms_guide.md") + with_ranges = "## Ranges" in guide + ans = {"clients": {}, "no_norm_group": [], "high_or_above": []} + for r in rows("clients.csv"): + cid = r["client_id"] + if "age" in r: age = int(r["age"]) + else: + by, bm, bd = [int(x) for x in r["date_of_birth"].split("-")] + ty, tm, td = [int(x) for x in r["test_date"].split("-")] + age = ty - by + if tm < bm or (tm == bm and td < bd): age -= 1 + scale = r.get("scale") or only_scale + group = [g for g in table[(scale, r["sex"])] if g[0] <= age <= g[1]] + if not group: + if cid not in ans["no_norm_group"]: ans["no_norm_group"].append(cid) + continue + z = (float(r["raw_score"]) - group[0][2]) / group[0][3] + t = 50 + 10 * z + res = {"z": round(z, 2), "t_score": round(t, 1), "percentile": round(50 * (1 + math.erf(z / math.sqrt(2))), 1)} + if with_ranges: + res["range"] = "very-high" if t >= 70 else "high" if t >= 60 else "average" if t >= 40 else "low" + if t >= 60: ans["high_or_above"].append("%s:%s" % (cid, scale)) + c = ans["clients"].setdefault(cid, {"age": age, "scales": {}}) + c["scales"][scale] = res + else: + res["age"] = age + ans["clients"][cid] = res + return ans + +# ---------------------------------------------------------------- reliability +def variance(xs): + m = sum(xs) / len(xs) + return sum((x - m) * (x - m) for x in xs) / (len(xs) - 1) + +def corr(xs, ys): + n = len(xs); mx = sum(xs) / n; my = sum(ys) / n + cov = sum((x - mx) * (y - my) for x, y in zip(xs, ys)) / (n - 1) + return cov / math.sqrt(variance(xs) * variance(ys)) + +def alpha_of(cols): + k = len(cols) + totals = [sum(c[i] for c in cols) for i in range(len(cols[0]))] + return k / (k - 1) * (1 - sum(variance(c) for c in cols) / variance(totals)) + +def reliability(): + notes = text("reliability_notes.md") + m = re.search(r"^Reverse-keyed items:([^.]*)\.", notes, re.M) + reverse = set(re.findall(r"q\d+", m.group(1))) if m else set() + data = rows("item_responses.csv") + qs = sorted([c for c in data[0] if re.match(r"^q\d+$", c)], key=lambda c: int(c[1:])) + complete = [r for r in data if all(r[q].strip() != "" for q in qs)] + cols = dict((q, [(6 - int(r[q])) if q in reverse else int(r[q]) for r in complete]) for q in qs) + alpha = alpha_of([cols[q] for q in qs]) + totals = [sum(cols[q][i] for q in qs) for i in range(len(complete))] + ans = {"items": {}, "total_variance": round(variance(totals), 3), "alpha": round(alpha, 3), "weak_items": [], "n_used": len(complete)} + best, best_alpha = None, None + for q in qs: + rest = [t - x for t, x in zip(totals, cols[q])] + rr = corr(cols[q], rest) + a_del = alpha_of([cols[p] for p in qs if p != q]) + ans["items"][q] = {"mean": round(sum(cols[q]) / len(cols[q]), 2), "variance": round(variance(cols[q]), 3), + "item_rest_r": round(rr, 3), "alpha_if_deleted": round(a_del, 3)} + if rr < 0.30: ans["weak_items"].append(q) + if best is None or a_del > best_alpha: best, best_alpha = q, a_del + ans["best_item_to_drop"] = best + ans["alpha_gain"] = round(best_alpha - alpha, 3) + return ans + +if os.path.exists("scoring_manual.md"): answer = scoring() +elif os.path.exists("rci_rules.md"): answer = reliable_change() +elif os.path.exists("norms.csv"): answer = norms() +else: answer = reliability() +with open("answer.json", "w") as f: json.dump(answer, f, indent=1) diff --git a/envs/seat_count/__init__.py b/envs/seat_count/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/envs/seat_count/env.toml b/envs/seat_count/env.toml new file mode 100644 index 0000000000000000000000000000000000000000..b05e4e83b7bcc6fcfebcd5481e3aee1801f601ea --- /dev/null +++ b/envs/seat_count/env.toml @@ -0,0 +1,7 @@ +name = "seat-count" +title = "Seat Count" +isced = "0312" +summary = "Turn election results into seats: apply thresholds, divisor and quota methods, constituency and levelling seats, and measure disproportionality." +task_type = "electoral seat allocation" +good_for = ["Applying a written allocation rule exactly", "Aggregating and filtering count records", "Multi-step procedures with graded reward"] +families = ["highest-averages", "largest-remainder", "constituencies"] diff --git a/envs/seat_count/gen.py b/envs/seat_count/gen.py new file mode 100644 index 0000000000000000000000000000000000000000..991e0412adbd990aac477fad157df60dcab27666 --- /dev/null +++ b/envs/seat_count/gen.py @@ -0,0 +1,403 @@ +"""Seat Count (ISCED-F 0312 Political sciences and civics). + +Three task families, all from synthetic election counts: + highest-averages D'Hondt, Sainte-Lague and modified Sainte-Lague with a legal threshold + largest-remainder Hare or Droop quota, automatic seats and remainder seats + constituencies allocation within constituencies, national totals, the Gallagher index, + and (difficulty 3) levelling seats + +Methods and sources + D'Hondt divisors 1, 2, 3, ...; Sainte-Lague divisors 1, 3, 5, ...; modified Sainte-Lague replaces the + first divisor (1.4 in Norway, 1.2 in Sweden since 2018; the task always states the value). + Hare quota V / S; Droop quota floor(V / (S + 1)) + 1 (Droop 1881). Worked examples used in the tests + are the standard ones in the Wikipedia articles "D'Hondt method" and "Largest remainder method". + Gallagher least-squares index: sqrt(0.5 * sum((v_i - s_i)^2)), v and s in per cent + (M. Gallagher, "Proportionality, disproportionality and electoral systems", Electoral Studies 10, 1991). + The levelling-seat rule is a simplified form of the Swedish adjustment-seat rule (Vallagen 14 kap.): + a national allocation of all seats, with parties that hold more fixed seats than their entitlement + keeping them and being set aside. The task instruction states the rule in full. +""" +import math +from fractions import Fraction +from practice.core import Task, rng_for, to_csv, to_json, c_int, c_num, c_str, c_set + +ENV = "seat-count" +PARTIES = ["Alder", "Birch", "Cedar", "Elm", "Hazel", "Juniper", "Linden", "Maple", "Oak", "Rowan", "Spruce", "Willow"] +PLACES = ["Northfell", "Eastmere", "Southwick", "Westholm", "Midvale", "Highmoor", "Lakeside", "Greywater", "Stonebridge", "Fernhill"] +METHODS = ["dhondt", "sainte-lague", "modified-sainte-lague"] + +# ---------------------------------------------------------------- formulas +def divisor(method, first, k): + """Divisor for a party's (k+1)-th seat.""" + if method == "dhondt": return Fraction(k + 1) + if method == "modified-sainte-lague" and k == 0: return Fraction(str(first)) + return Fraction(2 * k + 1) + +def highest_averages(votes, seats, method, first=None): + """Return (seats per party, all quotients sorted from largest: list of (quotient, party)).""" + qs = [] + for p in sorted(votes): + for k in range(seats + 2): + qs.append((Fraction(votes[p]) / divisor(method, first, k), p)) + qs.sort(key=lambda t: (-t[0], t[1])) + alloc = dict((p, 0) for p in votes) + for q, p in qs[:seats]: alloc[p] += 1 + return alloc, qs + +def quota(total, seats, kind): + return Fraction(total, seats) if kind == "hare" else Fraction(total // (seats + 1) + 1) + +def largest_remainder(votes, seats, kind): + """Return (seats, automatic seats, parties given a remainder seat, quota, margin). + margin is the gap between the last winning and first losing remainder as a share of the quota (None if no contest).""" + q = quota(sum(votes.values()), seats, kind) + auto = dict((p, int(Fraction(v) / q)) for p, v in votes.items()) + rem = dict((p, votes[p] - auto[p] * q) for p in votes) + left = seats - sum(auto.values()) + order = sorted(votes, key=lambda p: (-rem[p], p)) + extra = order[:left] + total = dict((p, auto[p] + (1 if p in extra else 0)) for p in votes) + margin = (rem[order[left - 1]] - rem[order[left]]) / q if 0 < left < len(order) else None + return total, auto, extra, q, margin, left + +def gallagher(votes, seats): + """Least-squares index in percentage points over every party in `votes` (seats default 0).""" + tv = float(sum(votes.values())); ts = float(sum(seats.values())) + return math.sqrt(0.5 * sum((100.0 * votes[p] / tv - 100.0 * seats.get(p, 0) / ts) ** 2 for p in votes)) + +def levelling(nat_votes, fixed, total_seats, method, first=None): + """nat_votes and fixed cover the qualifying parties. Returns (total seats per party, list of quotient lists used).""" + active = sorted(nat_votes); used = [] + while True: + avail = total_seats - sum(fixed[p] for p in fixed if p not in active) + ent, qs = highest_averages(dict((p, nat_votes[p]) for p in active), avail, method, first) + used.append((qs, avail)) + over = [p for p in active if fixed[p] > ent[p]] + if not over: break + active = [p for p in active if p not in over] + return dict((p, ent[p] if p in active else fixed[p]) for p in fixed), used + +def clear_quotients(qs, seats, main=0.01, side=0.004): + """The last winning quotient is clearly above the first losing one, and both are unique.""" + a, b, c, e = qs[seats - 2][0] if seats >= 2 else None, qs[seats - 1][0], qs[seats][0], qs[seats + 1][0] + if (b - c) / b < main: return False + if a is not None and (a - b) / a < side: return False + return (c - e) / c >= side + +# ---------------------------------------------------------------- data +def make_votes(r, n, total, tpct, need_excluded): + """n parties with integer votes; every share at least 0.3 points away from the threshold.""" + t = tpct if tpct else 4 + while True: + w = [r.uniform(14, 34) for _ in range(3)] + [r.uniform(4, 13) for _ in range(n - 5)] + [r.uniform(0.6, t + 2.5) for _ in range(2)] + s = sum(w) + v = [int(total * x / s) for x in w] + tv = float(sum(v)) + sh = [100.0 * x / tv for x in v] + if len(set(v)) < n: continue + if tpct: + if any(abs(x - tpct) < 0.3 for x in sh): continue + below = sum(1 for x in sh if x < tpct) + if need_excluded and below == 0: continue + if n - below < 3: continue + names = r.sample(PARTIES, n) + return dict(zip(names, v)) + +def split(r, votes, k): + """Split each party's votes over k counting districts.""" + dw = [r.uniform(0.5, 1.5) for _ in range(k)] + out = [dict() for _ in range(k)] + for p in sorted(votes): + pw = [x * r.uniform(0.7, 1.3) for x in dw]; s = sum(pw) + parts = [int(votes[p] * x / s) for x in pw] + parts[0] += votes[p] - sum(parts) + for i in range(k): out[i][p] = parts[i] + return out + +def district_rows(r, votes, k, key): + names = ["%s %d" % (key, i + 1) for i in range(k)] + rows = [] + for name, part in zip(names, split(r, votes, k)): + tot = sum(part.values()) + hh = r.randint(20, 23) + for p in sorted(part): + rows.append({key.lower(): name, "party": p, "votes": part[p], "reported_at": "%02d:%02d" % (hh, r.randint(0, 59))}) + rows.append({key.lower(): name, "party": "BLANK", "votes": int(tot * r.uniform(0.004, 0.015)), "reported_at": "%02d:%02d" % (hh, r.randint(0, 59))}) + rows.append({key.lower(): name, "party": "INVALID", "votes": int(tot * r.uniform(0.002, 0.01)), "reported_at": "%02d:%02d" % (hh, r.randint(0, 59))}) + r.shuffle(rows) + return rows + +def method_text(method, first): + if method == "dhondt": return "D'Hondt (divisors 1, 2, 3, 4, ...)" + if method == "sainte-lague": return "Sainte-Lague (divisors 1, 3, 5, 7, ...)" + return "modified Sainte-Lague (divisors %s, 3, 5, 7, ...: the first divisor is %s instead of 1)" % (first, first) + +def pick_method(r, choices): + m = r.choice(choices) + return m, (r.choice([1.2, 1.4]) if m == "modified-sainte-lague" else None) + +BALLOT_NOTE = " Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share." +TOL = "Numbers are accepted within one unit of the last decimal place asked for." + +# ---------------------------------------------------------------- highest averages +def gen_ha(seed, d): + r = rng_for(ENV + "/highest-averages", seed, d) + n = {1: 5, 2: 7, 3: 9}[d] + while True: + seats = {1: r.randint(7, 15), 2: r.randint(15, 31), 3: r.randint(21, 49)}[d] + tpct = r.choice([3, 4, 5]) + method, first = pick_method(r, METHODS[:2] if d == 1 else METHODS) + votes = make_votes(r, n, r.randint(40000, 900000), tpct, True) + valid = sum(votes.values()) + qual = dict((p, v) for p, v in votes.items() if 100.0 * v / valid >= tpct) + alloc, qs = highest_averages(qual, seats, method, first) + if not clear_quotients(qs, seats): continue + if d == 3: + m2, f2 = pick_method(r, [m for m in METHODS if m != method]) + alloc2, qs2 = highest_averages(qual, seats, m2, f2) + if not clear_quotients(qs2, seats): continue + break + conf = {"seats": seats, "method": method, "threshold_percent": tpct} + if first: conf["first_divisor"] = first + if d == 1: + rows = [{"list_no": i + 1, "party": p, "votes": votes[p]} for i, p in enumerate(r.sample(sorted(votes), n))] + csv_text = to_csv(rows, ["list_no", "party", "votes"]) + src = "`results.csv` gives the votes for each party in an election for %d seats." % seats + else: + k = {2: 4, 3: 7}[d] + csv_text = to_csv(district_rows(r, votes, k, "District"), ["district", "party", "votes", "reported_at"]) + src = "`results.csv` gives the count from %d counting districts in an election for %d seats, in no particular order. Add the districts together." % (k, seats) + BALLOT_NOTE + checks = [c_int("valid_votes", valid)] + for p in sorted(votes): checks.append(c_num("vote_share_percent.%s" % p, 100.0 * votes[p] / valid, 2)) + checks.append(c_set("qualified", sorted(qual), weight=2)) + for p in sorted(votes): checks.append(c_int("seats.%s" % p, alloc.get(p, 0))) + checks += [c_str("last_seat_party", qs[seats - 1][1]), c_num("last_winning_quotient", float(qs[seats - 1][0]), 2), + c_str("runner_up_party", qs[seats][1]), c_num("first_losing_quotient", float(qs[seats][0]), 2)] + extra = "" + if d == 3: + conf["comparison_method"] = m2 + if f2: conf["comparison_first_divisor"] = f2 + for p in sorted(votes): checks.append(c_int("comparison_seats.%s" % p, alloc2.get(p, 0))) + checks.append(c_set("changed", sorted(p for p in votes if alloc.get(p, 0) != alloc2.get(p, 0)), weight=2)) + extra = """ +- `comparison_seats`: object keyed by party: the seats each party would get if the method were %s instead, with the same threshold. +- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).""" % method_text(m2, f2) + inst = """# Seat count: highest averages + +%s + +The seats are allocated by the highest-averages method %s. A party takes part in the allocation only if it has at least %d%% of the valid votes. These settings are also in `election.json`. + +How the method works: divide each qualifying party's votes by each divisor in turn. The %d largest quotients over all parties win one seat each. + +Write `answer.json` in this folder, a JSON object with: + +- `valid_votes`: total valid votes, an integer. +- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold). +- `qualified`: list of the parties that reach the threshold (any order). +- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold). +- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient. +- `last_winning_quotient`: that quotient, 2 decimals. +- `runner_up_party`: the party holding the largest quotient that does not win a seat. +- `first_losing_quotient`: that quotient, 2 decimals.%s + +%s +""" % (src, method_text(method, first), tpct, seats, extra, TOL) + return Task(ENV, "highest-averages", seed, d, "%d seats by %s" % (seats, method), inst, + {"results.csv": csv_text, "election.json": to_json(conf)}, checks, {"parties": n, "seats": seats}) + +# ---------------------------------------------------------------- largest remainder +QUOTA_TEXT = {"hare": "the Hare quota, Q = V / S (not rounded)", "droop": "the Droop quota, Q = floor(V / (S + 1)) + 1"} + +def gen_lr(seed, d): + r = rng_for(ENV + "/largest-remainder", seed, d) + n = {1: 5, 2: 7, 3: 8}[d] + while True: + seats = {1: r.randint(6, 14), 2: r.randint(12, 30), 3: r.randint(15, 40)}[d] + tpct = None if d == 1 else r.choice([2, 3, 4, 5]) + kind = r.choice(["hare", "droop"]) + votes = make_votes(r, n, r.randint(30000, 800000), tpct, d >= 2) + valid = sum(votes.values()) + qual = dict((p, v) for p, v in votes.items() if not tpct or 100.0 * v / valid >= tpct) + total, auto, extra, q, margin, left = largest_remainder(qual, seats, kind) + if left > len(qual) or left == 0 or margin is None or margin < 0.03: continue + if d == 3: + kind2 = "droop" if kind == "hare" else "hare" + total2, auto2, extra2, q2, margin2, left2 = largest_remainder(qual, seats, kind2) + if left2 > len(qual) or (margin2 is not None and margin2 < 0.03): continue + if total2 == total and r.random() < 0.6: continue # prefer cases where the quota matters + break + conf = {"seats": seats, "quota": kind} + if tpct: conf["threshold_percent"] = tpct + if d == 1: + rows = [{"list_no": i + 1, "party": p, "votes": votes[p]} for i, p in enumerate(r.sample(sorted(votes), n))] + csv_text = to_csv(rows, ["list_no", "party", "votes"]) + src = "`count.csv` gives the votes for each party in an election for %d seats. Every party takes part in the allocation." % seats + else: + k = {2: 4, 3: 6}[d] + csv_text = to_csv(district_rows(r, votes, k, "District"), ["district", "party", "votes", "reported_at"]) + src = ("`count.csv` gives the count from %d counting districts in an election for %d seats, in no particular order. Add the districts together.%s\n\n" + "A party takes part in the allocation only if it has at least %d%% of the valid votes.") % (k, seats, BALLOT_NOTE, tpct) + checks = [c_int("valid_votes", valid)] + if d >= 2: checks.append(c_set("qualified", sorted(qual), weight=2)) + checks.append(c_num("quota", float(q), 2)) + for p in sorted(votes): checks.append(c_int("automatic_seats.%s" % p, auto.get(p, 0))) + checks.append(c_set("remainder_seat_parties", sorted(extra), weight=2)) + for p in sorted(votes): checks.append(c_int("seats.%s" % p, total.get(p, 0))) + lines = ["- `valid_votes`: total valid votes, an integer."] + if d >= 2: lines.append("- `qualified`: list of the parties that reach the threshold (any order).") + lines += ["- `quota`: the quota Q, 2 decimals.", + "- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none%s)." % (", including those under the threshold" if d >= 2 else ""), + "- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).", + "- `seats`: object keyed by party: total seats, an integer for every party."] + if d == 3: + conf["comparison_quota"] = kind2 + checks.append(c_num("comparison_quota", float(q2), 2)) + for p in sorted(votes): checks.append(c_int("comparison_seats.%s" % p, total2.get(p, 0))) + checks.append(c_set("changed", sorted(p for p in votes if total.get(p, 0) != total2.get(p, 0)), weight=2)) + lines += ["- `comparison_quota`: the quota if the election used %s instead, 2 decimals." % QUOTA_TEXT[kind2], + "- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.", + "- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none)."] + inst = """# Seat count: largest remainder + +%s + +The seats are allocated by the largest-remainder method with %s. S is the number of seats and V is the total vote of the parties that take part in the allocation%s. The settings are also in `election.json`. + +How the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q). + +Write `answer.json` in this folder, a JSON object with: + +%s + +%s +""" % (src, QUOTA_TEXT[kind], "" if d == 1 else " (votes for parties under the threshold are not part of V)", "\n".join(lines), TOL) + return Task(ENV, "largest-remainder", seed, d, "%d seats by %s quota" % (seats, kind), inst, + {"count.csv": csv_text, "election.json": to_json(conf)}, checks, {"parties": n, "seats": seats}) + +# ---------------------------------------------------------------- constituencies +def gen_const(seed, d): + r = rng_for(ENV + "/constituencies", seed, d) + nc = {1: 3, 2: 5, 3: 7}[d]; n = {1: 4, 2: 6, 3: 7}[d] + while True: + method, first = pick_method(r, METHODS[:2] if d == 1 else METHODS) + tpct = None if d == 1 else r.choice([3, 4, 5]) + names = r.sample(PARTIES, n); places = r.sample(PLACES, nc) + weights = [r.uniform(22, 34), r.uniform(16, 26), r.uniform(10, 18), r.uniform(6, 12)] + if d >= 2: weights += [r.uniform(4, 9)] * (n - 6) + [r.uniform(1.5, 7.5), 0.0] + regional = names[-1] if d >= 2 else None + home = r.sample(places, r.choice([1, 2]) if d == 3 else 1) if regional else [] + cons, votes, other, ok = [], {}, {}, True + for c in places: + registered = r.randint(25, 160) * 1000 + r.randint(0, 999) + cast = int(registered * r.uniform(0.58, 0.86)) + blank = int(cast * r.uniform(0.004, 0.014)) if d >= 2 else 0 + invalid = int(cast * r.uniform(0.002, 0.009)) if d >= 2 else 0 + valid = cast - blank - invalid + w = [x * math.exp(r.gauss(0, 0.28)) for x in weights] + if c in home: w[-1] = r.uniform(0.16, 0.30) * sum(w) + s = sum(w) + votes[c] = dict((p, int(valid * x / s)) for p, x in zip(names, w) if x > 0) + other[c] = (blank, invalid) + cons.append({"constituency": c, "seats": {1: r.randint(3, 7), 2: r.randint(4, 10), 3: r.randint(4, 12)}[d], "registered_voters": registered}) + nat = dict((p, sum(votes[c].get(p, 0) for c in places)) for p in names) + valid = sum(nat.values()) + if len(set(nat.values())) < n: continue + if tpct: + sh = [100.0 * v / valid for v in nat.values()] + if any(abs(x - tpct) < 0.3 for x in sh): continue + if 100.0 * nat[regional] / valid >= tpct: continue + qual = sorted(p for p in names if not tpct or 100.0 * nat[p] / valid >= tpct) + if len(qual) < 3: continue + cs = {} + for row in cons: + c = row["constituency"] + alloc, qs = highest_averages(dict((p, votes[c][p]) for p in qual), row["seats"], method, first) + if not clear_quotients(qs, row["seats"], 0.01, 0.0): ok = False; break + cs[c] = alloc + if not ok: continue + fixed = dict((p, sum(cs[c].get(p, 0) for c in places)) for p in names) + nfixed = sum(fixed.values()) + if d == 3: + lev = r.randint(max(2, nfixed // 12), max(3, nfixed // 6)) + total, used = levelling(dict((p, nat[p]) for p in qual), dict((p, fixed[p]) for p in qual), nfixed + lev, method, first) + if not all(clear_quotients(qs, s, 0.01, 0.0) for qs, s in used): continue + final = dict((p, total.get(p, 0)) for p in names) + else: + final = fixed + break + rows = [] + for c in places: + for p in sorted(votes[c]): rows.append({"constituency": c, "party": p, "votes": votes[c][p]}) + if d >= 2: + rows.append({"constituency": c, "party": "BLANK", "votes": other[c][0]}) + rows.append({"constituency": c, "party": "INVALID", "votes": other[c][1]}) + r.shuffle(rows) + conf = {"method": method} + if first: conf["first_divisor"] = first + if tpct: conf["threshold_percent"] = tpct + if d == 3: conf["levelling_seats"] = lev + g = gallagher(nat, final) + checks = [c_int("valid_votes", valid)] + lines = ["- `valid_votes`: total valid votes in the whole country, an integer."] + if d >= 2: + ballots = valid + sum(b + i for b, i in other.values()) + checks.append(c_num("turnout_percent", 100.0 * ballots / sum(x["registered_voters"] for x in cons), 2)) + checks.append(c_set("qualified", qual, weight=2)) + lines += ["- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.", + "- `qualified`: list of the parties that reach the national threshold (any order)."] + if d <= 2: + for c in sorted(places): + for p in sorted(names): checks.append(c_int("constituency_seats.%s.%s" % (c, p), cs[c].get(p, 0))) + for p in sorted(names): checks.append(c_int("national_seats.%s" % p, fixed[p])) + lines += ["- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).", + "- `national_seats`: object keyed by party: seats summed over the constituencies."] + else: + for p in sorted(names): checks.append(c_int("fixed_seats.%s" % p, fixed[p])) + for p in sorted(names): checks.append(c_int("levelling_seats.%s" % p, final[p] - fixed[p])) + for p in sorted(names): checks.append(c_int("total_seats.%s" % p, final[p])) + lines += ["- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).", + "- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).", + "- `total_seats`: object keyed by party: fixed plus levelling seats."] + if d == 1: + for p in sorted(names): checks.append(c_num("vote_share_percent.%s" % p, 100.0 * nat[p] / valid, 2)) + for p in sorted(names): checks.append(c_num("seat_share_percent.%s" % p, 100.0 * fixed[p] / nfixed, 2)) + lines += ["- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.", + "- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals."] + checks.append(c_num("gallagher_index", g, 2)) + lines.append("- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats%s. Include every party on the ballot as its own term%s." % ( + "" if d < 3 else " (fixed plus levelling)", "" if d == 1 else ", also those with no seats; blank and invalid ballots are not a party")) + thr = "" if d == 1 else " A party takes part in the allocation, in every constituency, only if it has at least %d%% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there." % tpct + lev_text = "" + if d == 3: + tot = nfixed + lev + lev_text = """ +On top of the %d fixed constituency seats there are %d levelling seats, %d seats in all. They are shared out like this: + +1. Allocate the fixed seats in each constituency as described above. +2. Allocate all %d seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement. +3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the %d, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement. +4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats. +""" % (nfixed, lev, tot, tot, tot) + inst = """# Seat count: constituencies + +`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.%s%s + +Within each constituency the seats are allocated by the highest-averages method %s: divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`. +%s +Write `answer.json` in this folder, a JSON object with: + +%s + +%s +""" % (BALLOT_NOTE if d >= 2 else "", thr, method_text(method, first), lev_text, "\n".join(lines), TOL) + return Task(ENV, "constituencies", seed, d, "%d constituencies, %d parties" % (nc, n), inst, + {"votes.csv": to_csv(rows, ["constituency", "party", "votes"]), + "constituencies.csv": to_csv(cons, ["constituency", "seats", "registered_voters"]), + "election.json": to_json(conf)}, checks, {"constituencies": nc, "parties": n}) + +FAMILIES = {"highest-averages": gen_ha, "largest-remainder": gen_lr, "constituencies": gen_const} + +def generate(seed, difficulty, family=None): + fam = family or sorted(FAMILIES)[seed % len(FAMILIES)] + return FAMILIES[fam](seed, difficulty) diff --git a/envs/seat_count/oracle.py b/envs/seat_count/oracle.py new file mode 100644 index 0000000000000000000000000000000000000000..6c16d94864e3e1158f0691cea4a7d594f605db04 --- /dev/null +++ b/envs/seat_count/oracle.py @@ -0,0 +1,133 @@ +#!/usr/bin/env python3 +"""Reference solution for Seat Count. Works only from the files in the current directory.""" +import csv, json, math, os +from fractions import Fraction + +def rows(name): + with open(name, newline="") as f: return list(csv.DictReader(f)) + +NOT_VOTES = ("BLANK", "INVALID") + +def next_divisor(method, first, held): + if method == "dhondt": return held + 1 + if held == 0: return Fraction(str(first)) if method == "modified-sainte-lague" else 1 + return 2 * held + 1 + +def divisor_method(votes, seats, method, first): + """Award the seats one at a time to the party with the largest current quotient.""" + held = dict((p, 0) for p in votes) + last = None + for _ in range(seats): + best = max(votes, key=lambda p: Fraction(votes[p]) / next_divisor(method, first, held[p])) + last = (best, Fraction(votes[best]) / next_divisor(method, first, held[best])) + held[best] += 1 + nxt = max(votes, key=lambda p: Fraction(votes[p]) / next_divisor(method, first, held[p])) + return held, last, (nxt, Fraction(votes[nxt]) / next_divisor(method, first, held[nxt])) + +def tally(name): + party = {} + for r in rows(name): + if r["party"] in NOT_VOTES: continue + party[r["party"]] = party.get(r["party"], 0) + int(r["votes"]) + return party + +def over_threshold(party, conf): + valid = sum(party.values()) + t = conf.get("threshold_percent") + return dict((p, v) for p, v in party.items() if t is None or v * 100 >= t * valid) + +def highest_averages(conf): + party = tally("results.csv") + valid = sum(party.values()) + q = over_threshold(party, conf) + held, last, nxt = divisor_method(q, conf["seats"], conf["method"], conf.get("first_divisor")) + ans = {"valid_votes": valid, + "vote_share_percent": dict((p, round(100.0 * v / valid, 2)) for p, v in party.items()), + "qualified": sorted(q), "seats": dict((p, held.get(p, 0)) for p in party), + "last_seat_party": last[0], "last_winning_quotient": round(float(last[1]), 2), + "runner_up_party": nxt[0], "first_losing_quotient": round(float(nxt[1]), 2)} + if "comparison_method" in conf: + h2 = divisor_method(q, conf["seats"], conf["comparison_method"], conf.get("comparison_first_divisor"))[0] + ans["comparison_seats"] = dict((p, h2.get(p, 0)) for p in party) + ans["changed"] = sorted(p for p in party if h2.get(p, 0) != held.get(p, 0)) + return ans + +def quota_method(votes, seats, kind): + v = sum(votes.values()) + q = Fraction(v, seats) if kind == "hare" else Fraction(v // (seats + 1) + 1) + auto, rem = {}, {} + for p in votes: + auto[p] = (votes[p] * q.denominator) // q.numerator + rem[p] = votes[p] - auto[p] * q + left = seats - sum(auto.values()) + winners = sorted(votes, key=lambda p: rem[p], reverse=True)[:left] + return q, auto, winners + +def largest_remainder(conf): + party = tally("count.csv") + valid = sum(party.values()) + qual = over_threshold(party, conf) + q, auto, winners = quota_method(qual, conf["seats"], conf["quota"]) + ans = {"valid_votes": valid, "qualified": sorted(qual), "quota": round(float(q), 2), + "automatic_seats": dict((p, auto.get(p, 0)) for p in party), "remainder_seat_parties": winners, + "seats": dict((p, auto.get(p, 0) + (1 if p in winners else 0)) for p in party)} + if "comparison_quota" in conf: + q2, a2, w2 = quota_method(qual, conf["seats"], conf["comparison_quota"]) + ans["comparison_quota"] = round(float(q2), 2) + ans["comparison_seats"] = dict((p, a2.get(p, 0) + (1 if p in w2 else 0)) for p in party) + ans["changed"] = sorted(p for p in party if ans["comparison_seats"][p] != ans["seats"][p]) + return ans + +def constituencies(conf): + by_con, ballots = {}, 0 + for r in rows("votes.csv"): + ballots += int(r["votes"]) + if r["party"] in NOT_VOTES: continue + by_con.setdefault(r["constituency"], {})[r["party"]] = int(r["votes"]) + cons = rows("constituencies.csv") + national = {} + for c in by_con: + for p, v in by_con[c].items(): national[p] = national.get(p, 0) + v + valid = sum(national.values()) + qual = over_threshold(national, conf) + method, first = conf["method"], conf.get("first_divisor") + per_con, fixed = {}, dict((p, 0) for p in national) + for row in cons: + c = row["constituency"] + local = dict((p, by_con[c].get(p, 0)) for p in qual) + held = divisor_method(local, int(row["seats"]), method, first)[0] + per_con[c] = dict((p, held.get(p, 0)) for p in national) + for p in national: fixed[p] += per_con[c][p] + ans = {"valid_votes": valid, "qualified": sorted(qual), + "turnout_percent": round(100.0 * ballots / sum(int(r["registered_voters"]) for r in cons), 2)} + final = fixed + if "levelling_seats" in conf: + house = sum(fixed.values()) + conf["levelling_seats"] + remaining = dict(qual) + final = dict(fixed) + while True: + ent = divisor_method(remaining, house, method, first)[0] + over = [p for p in remaining if fixed[p] > ent[p]] + if not over: + for p in remaining: final[p] = ent[p] + break + for p in over: + house -= fixed[p] + del remaining[p] + ans["fixed_seats"] = fixed + ans["levelling_seats"] = dict((p, final[p] - fixed[p]) for p in national) + ans["total_seats"] = final + else: + ans["constituency_seats"] = per_con + ans["national_seats"] = fixed + seats = sum(final.values()) + ans["vote_share_percent"] = dict((p, round(100.0 * v / valid, 2)) for p, v in national.items()) + ans["seat_share_percent"] = dict((p, round(100.0 * final[p] / seats, 2)) for p in national) + ans["gallagher_index"] = round(math.sqrt(0.5 * sum((100.0 * national[p] / valid - 100.0 * final[p] / seats) ** 2 for p in national)), 2) + return ans + +with open("election.json") as f: conf = json.load(f) +if os.path.exists("constituencies.csv"): answer = constituencies(conf) +elif os.path.exists("count.csv"): answer = largest_remainder(conf) +else: answer = highest_averages(conf) +with open("answer.json", "w") as f: json.dump(answer, f, indent=1) diff --git a/envs/stand_inventory/__init__.py b/envs/stand_inventory/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/envs/stand_inventory/env.toml b/envs/stand_inventory/env.toml new file mode 100644 index 0000000000000000000000000000000000000000..1c430228bec223049e3b727142fd4d3983ca8ceb --- /dev/null +++ b/envs/stand_inventory/env.toml @@ -0,0 +1,7 @@ +name = "stand-inventory" +title = "Stand Inventory" +isced = "0821" +summary = "Do a forester's office work after a field inventory: plot expansion, basal area, tree and stand volume, a thinning rule and increment." +task_type = "forest mensuration" +good_for = ["Applying supplied equations to tallied records", "Filtering and unit conversion before aggregation", "Rule-following selection with a deterministic tie-break"] +families = ["plots", "volume", "thinning", "growth"] diff --git a/envs/stand_inventory/gen.py b/envs/stand_inventory/gen.py new file mode 100644 index 0000000000000000000000000000000000000000..278248907aec2e82c300e50a46a495f027be4e5a --- /dev/null +++ b/envs/stand_inventory/gen.py @@ -0,0 +1,467 @@ +"""Stand Inventory (ISCED-F 0821 Forestry). + +Four task families, all from synthetic field records: + plots fixed-area circular sample plots: stems per hectare, basal area per hectare and quadratic mean + diameter by plot and as a stand mean + volume tree volume from a supplied volume equation, heights from sample trees or a height-diameter curve, + stand volume per hectare by species, species shares, Lorey's height + thinning thinning from below to a target residual basal area, with a deterministic tie-break + growth periodic and mean annual increment from two inventories, Pressler's growth percent, years to a target + +Methods (standard forest mensuration, e.g. Avery and Burkhart, Forest Measurements; van Laar and Akca, +Forest Mensuration): + tree basal area g = pi * (d / 200)^2 m2 with d in cm; expansion factor = 10000 / plot area in m2; + quadratic mean diameter = sqrt(mean of d^2) = 200 * sqrt(G / (pi * N)); + volume equation of the Schumacher-Hall form v = a * d^b * h^c; form-factor rule v = g * h * f; + Naslund's height curve h = 1.3 + d^2 / (p + q * d)^2; Lorey's height = sum(g * h) / sum(g); + periodic annual increment = (V2 - V1 + removals in the period) / years; mean annual increment = total + production / age; Pressler's growth percent p = 200 / n * (V2 - V1) / (V2 + V1). +All coefficients are synthetic and are shipped in each task's reference file. +""" +import math +from practice.core import Task, rng_for, to_csv, c_int, c_num, c_str, c_set + +ENV = "stand-inventory" +SPECIES = ["pine", "spruce", "birch", "aspen"] +STANDS = ["Norrmyran 12", "Tallheden 4", "Granliden 27", "Bjorkbacken 8", "Storskogen 31", "Kvarnmon 16", "Langtjarn 5", "Ravasen 22"] +RADII = [7.98, 9.77, 10.0, 11.28, 12.62] + +def md_table(header, rows): + out = ["| " + " | ".join(header) + " |", "|" + "|".join(["---"] * len(header)) + "|"] + for row in rows: out.append("| " + " | ".join(str(x) for x in row) + " |") + return "\n".join(out) + +# ---------------------------------------------------------------- formulas +def basal_area_m2(dbh_cm): + return math.pi * (dbh_cm / 200.0) ** 2 + +def expansion_factor(radius_m): + """Trees per hectare that one tallied tree stands for on a circular plot of this radius.""" + return 10000.0 / (math.pi * radius_m ** 2) + +def qmd_cm(ba_m2_per_ha, stems_per_ha): + return 200.0 * math.sqrt(ba_m2_per_ha / (math.pi * stems_per_ha)) + +def plot_metrics(dbhs_cm, radius_m): + """(trees counted, stems per ha, basal area m2 per ha, quadratic mean diameter cm) for one plot.""" + ef = expansion_factor(radius_m) + stems = len(dbhs_cm) * ef + ba = sum(basal_area_m2(x) for x in dbhs_cm) * ef + return len(dbhs_cm), stems, ba, qmd_cm(ba, stems) + +def tree_volume(dbh_cm, height_m, a, b, c): + return a * dbh_cm ** b * height_m ** c + +def form_factor_volume(dbh_cm, height_m, f): + return basal_area_m2(dbh_cm) * height_m * f + +def curve_height(dbh_cm, p, q): + return 1.3 + dbh_cm ** 2 / (p + q * dbh_cm) ** 2 + +def lorey_height(pairs): + """pairs: (dbh_cm, height_m). Mean height weighted by basal area.""" + return sum(basal_area_m2(x) * h for x, h in pairs) / sum(basal_area_m2(x) for x, h in pairs) + +def thin_from_below(trees, plot_area_m2, target_ba): + """trees: (tree_no, dbh_cm, removable, damaged) for every live tree on the plot. + + Removes every removable damaged tree, then removable trees by rising dbh (lower tree number first among + equal dbh) until the residual basal area per hectare is at or below the target. Returns the tree numbers + removed, in the order removed.""" + ef = 10000.0 / plot_area_m2 + ba = sum(basal_area_m2(t[1]) for t in trees) * ef + removed = [] + for t in sorted(trees, key=lambda t: (t[1], t[0])): + if t[2] and t[3]: + removed.append(t[0]); ba -= basal_area_m2(t[1]) * ef + for t in sorted(trees, key=lambda t: (t[1], t[0])): + if ba <= target_ba: break + if t[2] and not t[3]: + removed.append(t[0]); ba -= basal_area_m2(t[1]) * ef + return removed + +def quadratic_mean(dbhs_cm): + return math.sqrt(sum(x * x for x in dbhs_cm) / float(len(dbhs_cm))) + +def periodic_annual_increment(v1, v2, removed_in_period, years): + return (v2 - v1 + removed_in_period) / float(years) + +def mean_annual_increment(v2, removed_to_date, age): + return (v2 + removed_to_date) / float(age) + +def pressler_percent(v1, v2, years): + return 200.0 / years * (v2 - v1) / float(v2 + v1) + +def years_to_target(v2, percent, target): + """Exact (fractional) years of compound growth at `percent` per year for v2 to reach target.""" + return math.log(target / float(v2)) / math.log(1 + percent / 100.0) + +# ---------------------------------------------------------------- plots +FORMULAS = """## Formulas + +- Plot area (m2) = pi x radius^2, with the radius in metres. +- Expansion factor = 10000 / plot area. Each counted tree stands for that many trees per hectare. +- Basal area of one tree (m2) = pi x (dbh / 200)^2, with dbh in cm. +- Stems per hectare = trees counted x expansion factor. +- Basal area per hectare (m2/ha) = sum of the counted trees' basal areas x expansion factor. +- Quadratic mean diameter (cm) = 200 x sqrt(basal area per hectare / (pi x stems per hectare)). +""" + +def gen_plots(seed, d): + r = rng_for(ENV + "/plots", seed, d) + n_plots = {1: 3, 2: 5, 3: 7}[d] + stand = r.choice(STANDS) + while True: + ids = ["P%02d" % i for i in sorted(r.sample(range(1, 60), n_plots))] + base_radius = r.choice(RADII) + rows, plot_rows, res, sp_ba = [], [], {}, {} + for p in ids: + radius = r.choice(RADII) if d == 3 else base_radius + unit = "mm" if (d == 3 and r.random() < 0.4) else "cm" + mean = r.uniform(14, 32) + pool = r.sample(SPECIES, r.randint(2, 3)) + kinds = ["in"] * (r.randint(8, 13) if d == 1 else r.randint(10, 18)) + if d >= 2: kinds += ["dead"] * r.randint(1, 3) + ["out"] * r.randint(1, 3) + r.shuffle(kinds) + counted, ef, sp_ba[p] = [], expansion_factor(radius), {} + for tno, kind in enumerate(kinds, 1): + dbh = round(min(62.0, max(5.0, r.gauss(mean, 0.28 * mean))), 1) + sp = r.choice(pool) + if kind == "out": dist = round(radius + r.uniform(0.06, 2.0), 2) + else: dist = round(min(radius - 0.06, radius * math.sqrt(r.random())), 2) + row = {"plot_id": p, "tree_no": tno, "species": sp} + if d == 3: row["dbh"] = int(round(dbh * 10)) if unit == "mm" else dbh + else: row["dbh_cm"] = dbh + if d >= 2: + row.update(status="dead" if kind == "dead" else "live", dist_m="%.2f" % dist, azimuth_deg=r.randint(0, 359)) + rows.append(row) + if kind == "in": + counted.append(dbh) + sp_ba[p][sp] = sp_ba[p].get(sp, 0.0) + basal_area_m2(dbh) * ef + res[p] = plot_metrics(counted, radius) + plot_rows.append({"plot_id": p, "radius_m": radius, "dbh_unit": unit, "crew": r.choice(["A", "B", "C"]), "slope_percent": r.randint(0, 12)}) + bas = [res[p][2] for p in ids] + if d == 1: break + cands = [t for t in range(10, 46) if min(bas) < t < max(bas) and all(abs(b - t) >= 0.4 for b in bas)] + if cands: + threshold = r.choice(cands); break + r.shuffle(rows) + s_stems = sum(res[p][1] for p in ids) / n_plots + s_ba = sum(bas) / n_plots + checks = [] + for p in ids: + n, stems, ba, q = res[p] + checks += [c_int("plots.%s.trees_counted" % p, n), c_num("plots.%s.stems_per_ha" % p, stems, 1), + c_num("plots.%s.basal_area_m2_per_ha" % p, ba, 2), c_num("plots.%s.qmd_cm" % p, q, 1)] + checks += [c_num("stand.stems_per_ha", s_stems, 1), c_num("stand.basal_area_m2_per_ha", s_ba, 2), c_num("stand.qmd_cm", qmd_cm(s_ba, s_stems), 1)] + notes = "# Inventory notes: stand %s\n\n- Fixed-area circular sample plots, callipered at breast height (1.3 m).\n" % stand + files = {} + if d < 3: notes += "- Plot radius: %s m (horizontal), the same for every plot.\n" % base_radius + else: notes += "- Plot radius differs between plots: see `plots.csv`.\n" + which = "Every tallied tree is alive and stands inside its plot, so every row counts." + more = "" + if d >= 2: + notes += "- Understocked threshold: %d m2 per hectare.\n" % threshold + which = ("Count a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` " + "(horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.") + checks.append(c_set("understocked", [p for p in ids if res[p][2] < threshold], weight=2)) + more += "\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order)." + if d == 3: + which += " `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first." + files["plots.csv"] = to_csv(plot_rows, ["plot_id", "radius_m", "dbh_unit", "crew", "slope_percent"]) + for sp in sorted(set(s for p in ids for s in sp_ba[p])): + checks.append(c_num("species_basal_area.%s" % sp, sum(sp_ba[p].get(sp, 0.0) for p in ids) / n_plots, 2)) + more += ("\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean " + "basal area in m2 per hectare, 2 decimals: the mean over all %d plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur." % n_plots) + header = ["plot_id", "tree_no", "species", "dbh" if d == 3 else "dbh_cm"] + (["status", "dist_m", "azimuth_deg"] if d >= 2 else []) + files["tally.csv"] = to_csv(rows, header) + files["inventory_notes.md"] = notes + "\n" + FORMULAS + inst = """# Stand inventory: sample plots + +`tally.csv` is the tree tally from %d circular sample plots in stand %s. `inventory_notes.md` gives the plot radius and the formulas to use. + +%s + +Write `answer.json` in this folder, a JSON object with: + +- `plots`: an object keyed by plot id, each with + - `trees_counted`: the number of trees that count, as an integer. + - `stems_per_ha`: stems per hectare, 1 decimal. + - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals. + - `qmd_cm`: quadratic mean diameter in cm, 1 decimal. +- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.%s + +Use pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for. +""" % (n_plots, stand, which, more) + return Task(ENV, "plots", seed, d, "Sample plot summary for %d plots" % n_plots, inst, files, checks, {"plots": n_plots}) + +# ---------------------------------------------------------------- volume +VOL = {"pine": (5.6e-5, 1.90, 0.95), "spruce": (6.1e-5, 1.85, 1.00), "birch": (4.8e-5, 1.95, 0.93)} +HD = {"pine": (1.9, 0.175), "spruce": (2.1, 0.165), "birch": (1.6, 0.185), "aspen": (1.7, 0.170)} + +def gen_volume(seed, d): + r = rng_for(ENV + "/volume", seed, d) + n_plots = {1: 1, 2: 3, 3: 4}[d] + stand = r.choice(STANDS) + while True: + species = sorted(r.sample(["pine", "spruce", "birch"], 2 if d == 1 and r.random() < 0.5 else 3)) + vol = dict((s, (float("%.7f" % (VOL[s][0] * r.uniform(0.93, 1.07))), round(VOL[s][1] + r.choice([-0.02, -0.01, 0, 0.01, 0.02]), 2), + round(VOL[s][2] + r.choice([-0.02, -0.01, 0, 0.01, 0.02]), 2))) for s in species) + if d == 3: species.append("aspen") + hd = dict((s, (round(HD[s][0] + r.uniform(-0.2, 0.2), 2), round(HD[s][1] + r.uniform(-0.01, 0.01), 3))) for s in species) + ff = r.choice([0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48]) + area = r.choice([200, 300, 400, 500]) + per_ha = 10000.0 / (n_plots * area) + ids = ["P%02d" % i for i in sorted(r.sample(range(1, 40), n_plots))] + rows, by_sp, lorey, estimated, measured = [], dict((s, 0.0) for s in species), [], 0, 0 + weights = [r.uniform(0.5, 2.0) for _ in species] + for p in ids: + mean = r.uniform(17, 30) + n_live = r.randint(11, 17) + kinds = ["live"] * n_live + (["dead"] * r.randint(1, 3) if d == 3 else []) + r.shuffle(kinds) + for tno, kind in enumerate(kinds, 1): + sp = r.choices(species, weights)[0] + dbh = round(min(55.0, max(7.0, r.gauss(mean, 0.25 * mean))), 1) + h_true = round(max(4.0, curve_height(dbh, *hd[sp]) * (1 + r.gauss(0, 0.06))), 1) + has_h = d == 1 or r.random() < 0.3 + row = {"plot_id": p, "tree_no": tno, "species": sp, "dbh_cm": dbh, "height_m": h_true if has_h else ""} + if d == 3: row["status"] = kind + rows.append(row) + if kind != "live": continue + if has_h: h = h_true; measured += 1 + else: h = curve_height(dbh, *hd[sp]); estimated += 1 + v = form_factor_volume(dbh, h, ff) if sp == "aspen" else tree_volume(dbh, h, *vol[sp]) + by_sp[sp] += v * per_ha + lorey.append((dbh, h)) + total = sum(by_sp.values()) + shares = sorted(((by_sp[s] / total * 100, s) for s in species), reverse=True) + if min(by_sp.values()) <= 0 or shares[0][0] - shares[1][0] < 3: continue + if d >= 2 and (measured < 3 or estimated < 3): continue + break + r.shuffle(rows) + checks = [] + for s in sorted(species): + checks += [c_num("species.%s.volume_m3_per_ha" % s, by_sp[s], 1), c_num("species.%s.share_percent" % s, by_sp[s] / total * 100, 1)] + checks += [c_num("total_volume_m3_per_ha", total, 1), c_str("dominant_species", shares[0][1], weight=2)] + ref = "# Volume reference: stand %s\n\n- Plot area: %d m2 (every plot).\n\n## Volume equation\n\n" % (stand, area) + ref += "Tree volume v (m3) = a x d^b x h^c, with d the dbh in cm and h the tree height in m. Coefficients by species (use these values):\n\n" + ref += md_table(["species", "a", "b", "c"], [(s, "%.7f" % vol[s][0], "%.2f" % vol[s][1], "%.2f" % vol[s][2]) for s in sorted(vol)]) + "\n" + heights = "Every tree's height was measured." + more = "" + if d >= 2: + ref += "\n## Height-diameter curve\n\nFor a tree without a measured height: h (m) = 1.3 + d^2 / (p + q x d)^2, with d the dbh in cm. Coefficients by species (use these values):\n\n" + ref += md_table(["species", "p", "q"], [(s, "%.2f" % hd[s][0], "%.3f" % hd[s][1]) for s in sorted(hd)]) + "\n" + heights = ("Heights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the " + "height-diameter curve in the reference file, without rounding it.") + checks.append(c_int("trees_with_curve_height", estimated)) + more += "\n- `trees_with_curve_height`: the number of %strees whose height you took from the curve, as an integer." % ("live " if d == 3 else "") + if d == 3: + ref += ("\n## Form-factor rule\n\nAspen has no volume equation here. For aspen use v (m3) = g x h x f, where g = pi x (d / 200)^2 is the tree's basal area in m2, " + "h is its height in m and f is the form factor.\n\n- Form factor for aspen: %.2f\n" % ff) + heights += " Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation." + checks.append(c_num("lorey_height_m", lorey_height(lorey), 1)) + more += ("\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its " + "basal area pi x (d / 200)^2, using the same heights as for the volumes.") + inst = """# Stand inventory: volume + +`trees.csv` lists the trees callipered on %s in stand %s. `volume_reference.md` gives the plot area, the volume equation and its coefficients. + +%s + +Work out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2). + +Write `answer.json` in this folder, a JSON object with: + +- `species`: an object keyed by species, each with + - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal. + - `share_percent`: its share of the total volume in percent, 1 decimal. +- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal. +- `dominant_species`: the species with the largest volume.%s + +Use pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for. +""" % ("one sample plot" if n_plots == 1 else "%d sample plots of equal size" % n_plots, stand, heights, more) + header = ["plot_id", "tree_no", "species", "dbh_cm", "height_m"] + (["status"] if d == 3 else []) + return Task(ENV, "volume", seed, d, "Stand volume from %d plot%s" % (n_plots, "" if n_plots == 1 else "s"), inst, + {"trees.csv": to_csv(rows, header), "volume_reference.md": ref}, checks, {"plots": n_plots}) + +# ---------------------------------------------------------------- thinning +def gen_thinning(seed, d): + r = rng_for(ENV + "/thinning", seed, d) + stand = r.choice(STANDS) + while True: + n_live = {1: r.randint(20, 26), 2: r.randint(26, 34), 3: r.randint(30, 40)}[d] + area = r.choice([400, 500, 600, 800, 1000]) + ef = 10000.0 / area + mean = r.uniform(19, 27) + pool = r.sample(SPECIES, r.randint(2, 3)) + nos = r.sample(range(1, 100), n_live + 4) + live = [{"tree_no": nos[i], "species": r.choice(pool), "dbh_cm": int(min(48, max(8, round(r.gauss(mean, 6))))), "status": "live", "retain": "no", "damaged": "no"} + for i in range(n_live)] + ba0 = sum(basal_area_m2(t["dbh_cm"]) for t in live) * ef + if not 24 <= ba0 <= 46: continue + by_size = sorted(live, key=lambda t: (t["dbh_cm"], t["tree_no"])) + if d >= 2: + for t in r.sample(by_size[:n_live // 3], r.randint(1, 2)) + r.sample(by_size[n_live // 3:], r.randint(1, 2)): t["retain"] = "yes" + if d == 3: + for t in r.sample([t for t in by_size[n_live // 4:] if t["retain"] == "no"], r.randint(2, 4)): t["damaged"] = "yes" + target = int(round(ba0 * r.uniform(0.6, 0.82))) + spec = [(t["tree_no"], t["dbh_cm"], t["retain"] == "no", t["damaged"] == "yes") for t in live] + removed = thin_from_below(spec, area, target) + n_dam = sum(1 for t in live if t["damaged"] == "yes") + if len(removed) - n_dam < 3: continue + dbh = dict((t["tree_no"], t["dbh_cm"]) for t in live) + ba_after = ba0 - sum(basal_area_m2(dbh[x]) for x in removed) * ef + ba_before_last = ba_after + basal_area_m2(dbh[removed[-1]]) * ef + if ba_after > target - 0.05 or ba_before_last < target + 0.05: continue + break + rows = list(live) + if d >= 2: + for i in range(r.randint(2, 4)): + rows.append({"tree_no": nos[n_live + i], "species": r.choice(pool), "dbh_cm": int(min(40, max(8, round(r.gauss(mean - 4, 5))))), "status": "dead", "retain": "no", "damaged": "no"}) + r.shuffle(rows) + rem_d = [dbh[x] for x in removed] + left = [t["dbh_cm"] for t in live if t["tree_no"] not in removed] + ba_rem = sum(basal_area_m2(x) for x in rem_d) * ef + checks = [c_set("removed_trees", sorted(removed), item="int", weight=2), c_int("stems_removed", len(removed)), + c_num("basal_area_before_m2_per_ha", ba0, 2), c_num("residual_basal_area_m2_per_ha", ba_after, 2), + c_num("residual_stems_per_ha", len(left) * ef, 1), c_num("basal_area_removed_percent", ba_rem / ba0 * 100, 1), + c_num("thinning_ratio", quadratic_mean(rem_d) / quadratic_mean(list(dbh.values())), 2)] + rules = ["Thin from below: remove live trees one at a time in order of rising dbh. Among trees with the same dbh, remove the lower tree number first.", + "After each removal work out the residual basal area per hectare. Stop as soon as it is at or below the target; do not remove any tree after that."] + pre = "Every tree on the plot is alive." + more = "" + if d >= 2: + rules.insert(0, "Dead trees (`status` is `dead`) are not part of the stand: they are not counted in any figure and are not removed.") + rules.insert(1, "Retention trees (`retain` is `yes`) are never removed, but they count in the basal area and the stem numbers.") + pre = "The plot also holds dead trees and marked retention trees; the prescription says how to treat them." + if d == 3: + rules.insert(2, "First remove every damaged live tree (`damaged` is `yes`), whatever its size. These removals count towards the target.") + rules[3] = "Then thin from below among the remaining live trees: remove them one at a time in order of rising dbh. Among trees with the same dbh, remove the lower tree number first." + sp_live = sorted(set(t["species"] for t in live)) + sp_of = dict((t["tree_no"], t["species"]) for t in live) + for s in sp_live: checks.append(c_int("removed_by_species.%s" % s, sum(1 for x in removed if sp_of[x] == s))) + checks.append(c_num("residual_qmd_cm", quadratic_mean(left), 1)) + more = ("\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed." + "\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.") + ref = ("# Thinning prescription: stand %s\n\n- Plot area: %d m2\n- Target residual basal area: %d m2 per hectare\n\n## Rules\n\n%s\n\n## Formulas\n\n" + "- Basal area of one tree (m2) = pi x (dbh / 200)^2, with dbh in cm.\n- Per-hectare values = plot values x 10000 / plot area in m2.\n" + "- Quadratic mean dbh of a group of trees = square root of the mean of their squared dbh.\n" + % (stand, area, target, "\n".join("%d. %s" % (i + 1, x) for i, x in enumerate(rules)))) + inst = """# Stand inventory: marking a thinning + +`plot_trees.csv` lists the trees on one marking plot in stand %s. `thinning_prescription.md` gives the plot area, the target and the rules. %s + +Apply the rules exactly and write `answer.json` in this folder, a JSON object with: + +- `removed_trees`: list of the tree numbers to remove, as integers (any order). +- `stems_removed`: how many trees are removed, as an integer. +- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals. +- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals. +- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal. +- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal. +- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.%s + +Use pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for. +""" % (stand, pre, more) + header = ["tree_no", "species", "dbh_cm"] + (["status", "retain"] if d >= 2 else []) + (["damaged"] if d == 3 else []) + return Task(ENV, "thinning", seed, d, "Thinning from below on a %d m2 plot" % area, inst, + {"plot_trees.csv": to_csv(rows, header), "thinning_prescription.md": ref}, checks, {"trees": len(rows)}) + +# ---------------------------------------------------------------- growth +def gen_growth(seed, d): + r = rng_for(ENV + "/growth", seed, d) + n = {1: 4, 2: 6, 3: 8}[d] + ids = ["S%03d" % i for i in sorted(r.sample(range(101, 400), n + 2))] + others, ids = [ids[1], ids[-2]], [s for i, s in enumerate(ids) if i not in (1, n)] + inv, rem, tgt, res = [], [], [], {} + for s in ids: + while True: + period = r.choice([5, 6, 8, 10]) + y2 = r.randint(2019, 2024); y1 = y2 - period + age2 = r.randint(32, 110) + mai_t = r.uniform(3.0, 8.5) + pai_t = mai_t * r.uniform(0.45, 1.7) + r_before = r.choice([0, r.randint(15, 60), r.randint(15, 60)]) if d >= 2 else 0 + r_period = r.choice([0, r.randint(15, 60)]) if d >= 2 else 0 + v2 = int(round(mai_t * age2)) - r_before - r_period + v1 = v2 + r_period - int(round(pai_t * period)) + if v1 < 30 or v2 < 40: continue + pai = periodic_annual_increment(v1, v2, r_period, period) + mai = mean_annual_increment(v2, r_before + r_period, age2) + if abs(pai - mai) < 0.15: continue + out = [pai, mai] + if d == 3: + if v2 < v1 * 1.04: continue + p = pressler_percent(v1, v2, period) + target = int(round(v2 * r.uniform(1.12, 1.7))) + t = years_to_target(v2, p, target) + if t > 60 or abs(t - round(t)) < 0.08: continue + out += [p, int(math.ceil(t))] + tgt.append({"stand_id": s, "target_volume_m3_per_ha": target}) + break + res[s] = out + crew = lambda: r.choice(["north", "south", "contract"]) + inv.append({"stand_id": s, "inventory_year": y1, "age_yr": age2 - period, "volume_m3_per_ha": v1, "district": crew()}) + inv.append({"stand_id": s, "inventory_year": y2, "age_yr": age2, "volume_m3_per_ha": v2, "district": crew()}) + y0 = y1 + if d == 3: + y0 = y1 - r.choice([5, 8, 10]) + inv.append({"stand_id": s, "inventory_year": y0, "age_yr": age2 - (y2 - y0), "volume_m3_per_ha": max(12, v1 - r.randint(10, 70)), "district": crew()}) + if r_period: rem.append({"stand_id": s, "year": r.randint(y1 + 1, y2 - 1), "removed_m3_per_ha": r_period, "operation": "thinning"}) + if r_before: + first = r.randint(8, r_before - 7) if r.random() < 0.5 else 0 + for vol_ in (first, r_before - first): + if vol_: rem.append({"stand_id": s, "year": r.choice([y for y in range(y1 - 14, y1) if y != y0]), "removed_m3_per_ha": vol_, "operation": r.choice(["thinning", "cleaning", "storm salvage"])}) + if d >= 2: + for s in others: + for _ in range(r.randint(1, 2)): rem.append({"stand_id": s, "year": r.randint(2005, 2023), "removed_m3_per_ha": r.randint(15, 60), "operation": "thinning"}) + r.shuffle(inv); r.shuffle(rem) + checks = [] + for s in ids: + checks += [c_num("stands.%s.periodic_annual_increment" % s, res[s][0], 2), c_num("stands.%s.mean_annual_increment" % s, res[s][1], 2)] + if d == 3: checks += [c_num("stands.%s.growth_percent" % s, res[s][2], 2), c_int("stands.%s.years_to_target" % s, res[s][3])] + checks.append(c_set("past_culmination", [s for s in ids if res[s][0] < res[s][1]], weight=2)) + files = {"inventories.csv": to_csv(inv, ["stand_id", "inventory_year", "age_yr", "volume_m3_per_ha", "district"])} + notes = "# Growth notes\n\nV1 and V2 are the standing volumes (m3 per hectare) at the earlier and the later of the two inventories used, n is the number of years between them.\n\n" + if d == 1: + notes += ("- Periodic annual increment (m3 per hectare per year) = (V2 - V1) / n. It stands in for the current annual increment.\n" + "- Mean annual increment (m3 per hectare per year) = V2 / stand age at the later inventory.\n") + intro = "`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands." + else: + files["removals.csv"] = to_csv(rem, ["stand_id", "year", "removed_m3_per_ha", "operation"]) + notes += ("- Periodic annual increment (m3 per hectare per year) = (V2 - V1 + volume removed between the two inventories) / n. It stands in for the current annual increment. " + "A removal lies between the two inventories when its year is after the earlier inventory year and before the later one. No removal falls in an inventory year.\n" + "- Mean annual increment (m3 per hectare per year) = (V2 + every removal recorded for the stand before the later inventory, whatever the operation) / stand age at the later inventory.\n") + intro = ("`inventories.csv` holds %s of each stand, in no particular order, and `removals.csv` lists the volumes cut. " + "The removals file also covers stands that are not in this inventory; ignore those." % ("two inventories" if d == 2 else "three inventories")) + more = "" + if d == 3: + files["targets.csv"] = to_csv(tgt, ["stand_id", "target_volume_m3_per_ha"]) + intro += " Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand." + notes += ("- Growth percent by Pressler's formula, on the standing volumes: p = 200 / n x (V2 - V1) / (V2 + V1), in percent per year. Removals are not added here.\n" + "- Years to target: assume the standing volume grows by p percent per year, compounding, from V2 with nothing removed: volume after t years = V2 x (1 + p / 100)^t. " + "The answer is the smallest whole number of years t at which the volume is at or above the target.\n") + more = ("\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals." + "\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.") + files["growth_notes.md"] = notes + inst = """# Stand inventory: growth and yield + +%s `growth_notes.md` gives the formulas. + +Write `answer.json` in this folder, a JSON object with: + +- `stands`: an object keyed by stand id, each with + - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals. + - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.%s +- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none). + +Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for. +""" % (intro, more) + return Task(ENV, "growth", seed, d, "Increment for %d stands" % n, inst, files, checks, {"stands": n}) + +FAMILIES = {"plots": gen_plots, "volume": gen_volume, "thinning": gen_thinning, "growth": gen_growth} + +def generate(seed, difficulty, family=None): + fam = family or sorted(FAMILIES)[seed % len(FAMILIES)] + return FAMILIES[fam](seed, difficulty) diff --git a/envs/stand_inventory/oracle.py b/envs/stand_inventory/oracle.py new file mode 100644 index 0000000000000000000000000000000000000000..8efd176a1dc8bdc51fca9ccf6ac91e10d4a74920 --- /dev/null +++ b/envs/stand_inventory/oracle.py @@ -0,0 +1,150 @@ +#!/usr/bin/env python3 +"""Reference solution for Stand Inventory. Works only from the files in the current directory.""" +import csv, json, math, os, re + +def rows(name): + with open(name, newline="") as f: return list(csv.DictReader(f)) + +def text(name): + with open(name) as f: return f.read() + +def number_after(label, s): + return float(re.search(re.escape(label) + r"\s*([0-9.]+)", s).group(1)) + +def md_tables(s): + """Every Markdown table in s, as a list of row dictionaries.""" + tables, cur = [], None + for line in s.splitlines(): + line = line.strip() + if not line.startswith("|"): + cur = None; continue + cells = [c.strip() for c in line.strip("|").split("|")] + if cur is None: + cur = {"head": cells, "rows": []}; tables.append(cur) + elif not all(set(c) <= set("-: ") for c in cells): + cur["rows"].append(dict(zip(cur["head"], cells))) + return [t["rows"] for t in tables] + +def g(d): return math.pi * d * d / 40000.0 + +def plots(): + notes = text("inventory_notes.md") + info = {} + if os.path.exists("plots.csv"): + for r in rows("plots.csv"): info[r["plot_id"]] = (float(r["radius_m"]), r["dbh_unit"]) + trees = {} + for r in rows("tally.csv"): + p = r["plot_id"] + radius, unit = info.get(p) or (number_after("Plot radius:", notes), "cm") + trees.setdefault(p, {"radius": radius, "list": []}) + if r.get("status", "live") != "live": continue + if "dist_m" in r and float(r["dist_m"]) > radius: continue + d = float(r["dbh"]) / (10.0 if unit == "mm" else 1.0) if "dbh" in r else float(r["dbh_cm"]) + trees[p]["list"].append((r["species"], d)) + ans = {"plots": {}, "stand": {}} + species = {} + for p, t in trees.items(): + ef = 10000.0 / (math.pi * t["radius"] ** 2) + n = len(t["list"]) * ef + ba = sum(g(d) for s, d in t["list"]) * ef + ans["plots"][p] = {"trees_counted": len(t["list"]), "stems_per_ha": round(n, 1), "basal_area_m2_per_ha": round(ba, 2), + "qmd_cm": round(200 * math.sqrt(ba / (math.pi * n)), 1), "_n": n, "_ba": ba} + for s, d in t["list"]: species[s] = species.get(s, 0.0) + g(d) * ef + k = float(len(trees)) + n = sum(v.pop("_n") for v in ans["plots"].values()) / k + ba = sum(v["_ba"] for v in ans["plots"].values()) / k + ans["stand"] = {"stems_per_ha": round(n, 1), "basal_area_m2_per_ha": round(ba, 2), "qmd_cm": round(200 * math.sqrt(ba / (math.pi * n)), 1)} + m = re.search(r"Understocked threshold:\s*([0-9.]+)", notes) + if m: ans["understocked"] = [p for p, v in ans["plots"].items() if v["_ba"] < float(m.group(1))] + for v in ans["plots"].values(): del v["_ba"] + ans["species_basal_area"] = dict((s, round(v / k, 2)) for s, v in species.items()) + return ans + +def volume(): + ref = text("volume_reference.md") + area = number_after("Plot area:", ref) + coef, curve = {}, {} + for table in md_tables(ref): + for r in table: + if "a" in r: coef[r["species"]] = (float(r["a"]), float(r["b"]), float(r["c"])) + else: curve[r["species"]] = (float(r["p"]), float(r["q"])) + m = re.search(r"Form factor for (\w+):\s*([0-9.]+)", ref) + ff = {m.group(1): float(m.group(2))} if m else {} + trees = rows("trees.csv") + scale = 10000.0 / (len(set(r["plot_id"] for r in trees)) * area) + vol, from_curve, gh, gsum = {}, 0, 0.0, 0.0 + for r in trees: + if r.get("status", "live") != "live": continue + s, d = r["species"], float(r["dbh_cm"]) + if r["height_m"].strip(): h = float(r["height_m"]) + else: + p, q = curve[s] + h = 1.3 + d * d / (p + q * d) ** 2 + from_curve += 1 + if s in ff: v = g(d) * h * ff[s] + else: + a, b, c = coef[s] + v = a * d ** b * h ** c + vol[s] = vol.get(s, 0.0) + v * scale + gh += g(d) * h; gsum += g(d) + total = sum(vol.values()) + return {"species": dict((s, {"volume_m3_per_ha": round(v, 1), "share_percent": round(100 * v / total, 1)}) for s, v in vol.items()), + "total_volume_m3_per_ha": round(total, 1), "dominant_species": max(vol, key=lambda s: vol[s]), + "trees_with_curve_height": from_curve, "lorey_height_m": round(gh / gsum, 1)} + +def thinning(): + ref = text("thinning_prescription.md") + scale = 10000.0 / number_after("Plot area:", ref) + target = number_after("Target residual basal area:", ref) + live = [r for r in rows("plot_trees.csv") if r.get("status", "live") == "live"] + for r in live: + r["no"] = int(r["tree_no"]); r["d"] = float(r["dbh_cm"]) + before = sum(g(r["d"]) for r in live) * scale + ba, removed = before, [] + candidates = sorted((r for r in live if r.get("retain", "no") != "yes"), key=lambda r: (r["d"], r["no"])) + for r in candidates: + if r.get("damaged") == "yes": + removed.append(r); ba -= g(r["d"]) * scale + for r in candidates: + if ba <= target: break + if r.get("damaged") != "yes": + removed.append(r); ba -= g(r["d"]) * scale + gone = set(r["no"] for r in removed) + left = [r for r in live if r["no"] not in gone] + def qm(rs): return math.sqrt(sum(r["d"] ** 2 for r in rs) / len(rs)) + by_species = dict((s, 0) for s in set(r["species"] for r in live)) + for r in removed: by_species[r["species"]] += 1 + return {"removed_trees": sorted(gone), "stems_removed": len(removed), "basal_area_before_m2_per_ha": round(before, 2), + "residual_basal_area_m2_per_ha": round(sum(g(r["d"]) for r in left) * scale, 2), "residual_stems_per_ha": round(len(left) * scale, 1), + "basal_area_removed_percent": round(100 * sum(g(r["d"]) for r in removed) * scale / before, 1), + "thinning_ratio": round(qm(removed) / qm(live), 2), "removed_by_species": by_species, "residual_qmd_cm": round(qm(left), 1)} + +def growth(): + inv = {} + for r in rows("inventories.csv"): + inv.setdefault(r["stand_id"], []).append((int(r["inventory_year"]), int(r["age_yr"]), float(r["volume_m3_per_ha"]))) + cuts = rows("removals.csv") if os.path.exists("removals.csv") else [] + targets = dict((r["stand_id"], float(r["target_volume_m3_per_ha"])) for r in rows("targets.csv")) if os.path.exists("targets.csv") else {} + ans = {"stands": {}, "past_culmination": []} + for s, lst in inv.items(): + lst.sort() + (y1, a1, v1), (y2, a2, v2) = lst[-2], lst[-1] + mine = [(int(c["year"]), float(c["removed_m3_per_ha"])) for c in cuts if c["stand_id"] == s] + pai = (v2 - v1 + sum(v for y, v in mine if y1 < y < y2)) / (y2 - y1) + mai = (v2 + sum(v for y, v in mine if y < y2)) / a2 + o = {"periodic_annual_increment": round(pai, 2), "mean_annual_increment": round(mai, 2)} + if s in targets: + p = 200.0 / (y2 - y1) * (v2 - v1) / (v2 + v1) + t, v = 0, v2 + while v < targets[s]: + t += 1; v = v2 * (1 + p / 100.0) ** t + o["growth_percent"] = round(p, 2); o["years_to_target"] = t + ans["stands"][s] = o + if pai < mai: ans["past_culmination"].append(s) + return ans + +if os.path.exists("tally.csv"): answer = plots() +elif os.path.exists("volume_reference.md"): answer = volume() +elif os.path.exists("plot_trees.csv"): answer = thinning() +else: answer = growth() +with open("answer.json", "w") as f: json.dump(answer, f, indent=1) diff --git a/envs/ward_round/__init__.py b/envs/ward_round/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/envs/ward_round/env.toml b/envs/ward_round/env.toml new file mode 100644 index 0000000000000000000000000000000000000000..00a107b2482024042d978388c1cef5b16b80617f --- /dev/null +++ b/envs/ward_round/env.toml @@ -0,0 +1,7 @@ +name = "ward-round" +title = "Ward Round" +isced = "0913" +summary = "Do a nurse's bedside calculations from ward charts: early-warning scores, infusion rates, weight-based doses and 24-hour fluid balance." +task_type = "clinical calculation" +good_for = ["Careful multi-step arithmetic on tabular records", "Applying a written scoring rule exactly", "Small-model RL with graded reward"] +families = ["news2", "dosing", "fluid-balance"] diff --git a/envs/ward_round/gen.py b/envs/ward_round/gen.py new file mode 100644 index 0000000000000000000000000000000000000000..faba0fc44ca0c533a0f6c693cc5f32dfd49e0615 --- /dev/null +++ b/envs/ward_round/gen.py @@ -0,0 +1,239 @@ +"""Ward Round (ISCED-F 0913 Nursing and midwifery). + +Three task families, all from synthetic ward records: + news2 score each patient's latest observations with the NEWS2 early-warning rules + dosing weight-based doses with a maximum, volume to draw up, infusion pump and drip rates + fluid-balance 24-hour intake, output and balance per patient, and an oliguria flag + +NEWS2 bands follow the Royal College of Physicians' National Early Warning Score 2 (2017). +""" +from practice.core import Task, rng_for, to_csv, c_int, c_num, c_str, c_set, c_bool, half_up + +ENV = "ward-round" + +# ---------------------------------------------------------------- NEWS2 +RULES = """# NEWS2 scoring rules + +Score each of the seven parameters, then add them up. + +| Parameter | 3 | 2 | 1 | 0 | 1 | 2 | 3 | +|---|---|---|---|---|---|---|---| +| Respiratory rate (breaths/min) | 8 or less | | 9 to 11 | 12 to 20 | | 21 to 24 | 25 or more | +| SpO2 scale 1 (%) | 91 or less | 92 to 93 | 94 to 95 | 96 or more | | | | +| SpO2 scale 2 (%) | 83 or less | 84 to 85 | 86 to 87 | 88 to 92, or 93 or more on air | 93 to 94 on oxygen | 95 to 96 on oxygen | 97 or more on oxygen | +| Air or oxygen | | oxygen | | air | | | | +| Systolic blood pressure (mmHg) | 90 or less | 91 to 100 | 101 to 110 | 111 to 219 | | | 220 or more | +| Pulse (beats/min) | 40 or less | | 41 to 50 | 51 to 90 | 91 to 110 | 111 to 130 | 131 or more | +| Consciousness | | | | A (alert) | | | C, V, P or U | +| Temperature (deg C) | 35.0 or less | | 35.1 to 36.0 | 36.1 to 38.0 | 38.1 to 39.0 | 39.1 or more | | + +Use SpO2 scale 2 only for patients whose record says `spo2_scale` 2 (target range 88 to 92%). Everyone else uses scale 1. + +## Response band + +- `high`: total of 7 or more. +- `medium`: total of 5 or 6. +- `low-medium`: total of 0 to 4, with any single parameter scoring 3. +- `low`: total of 0 to 4, with no single parameter scoring 3. +""" + +def s_rr(v): return 3 if v <= 8 else 1 if v <= 11 else 0 if v <= 20 else 2 if v <= 24 else 3 +def s_spo2(v, scale, o2): + if scale == 1: return 3 if v <= 91 else 2 if v <= 93 else 1 if v <= 95 else 0 + if v <= 83: return 3 + if v <= 85: return 2 + if v <= 87: return 1 + if v <= 92 or not o2: return 0 + return 1 if v <= 94 else 2 if v <= 96 else 3 +def s_bp(v): return 3 if v <= 90 else 2 if v <= 100 else 1 if v <= 110 else 0 if v <= 219 else 3 +def s_pulse(v): return 3 if v <= 40 else 1 if v <= 50 else 0 if v <= 90 else 1 if v <= 110 else 2 if v <= 130 else 3 +def s_temp(v): return 3 if v <= 35.0 else 1 if v <= 36.0 else 0 if v <= 38.0 else 1 if v <= 39.0 else 2 + +def news2(o): + parts = [s_rr(o["resp_rate"]), s_spo2(o["spo2"], o["spo2_scale"], o["on_oxygen"] == "yes"), 2 if o["on_oxygen"] == "yes" else 0, + s_bp(o["systolic_bp"]), s_pulse(o["pulse"]), 0 if o["consciousness"] == "A" else 3, s_temp(o["temperature"])] + total = sum(parts) + band = "high" if total >= 7 else "medium" if total >= 5 else "low-medium" if 3 in parts else "low" + return total, band + +def obs(r, sick): + """One observation set; `sick` in [0, 1] shifts the vitals away from normal.""" + def pick(normal, off): + return r.choice(off) if r.random() < sick else r.choice(normal) + scale = 2 if r.random() < 0.2 else 1 + o2 = "yes" if r.random() < (0.25 + 0.4 * sick) else "no" + if scale == 1: spo2 = pick(range(96, 100), range(88, 96)) + else: spo2 = pick(range(88, 93), list(range(82, 88)) + list(range(93, 99))) + return {"resp_rate": pick(range(12, 21), [7, 8, 9, 10, 11, 21, 22, 23, 24, 25, 26, 28, 30]), + "spo2": spo2, "spo2_scale": scale, "on_oxygen": o2, + "systolic_bp": pick(range(111, 160), [84, 88, 90, 91, 95, 100, 101, 105, 110, 220, 225]), + "pulse": pick(range(51, 91), [38, 40, 41, 46, 50, 91, 98, 105, 110, 111, 120, 130, 131, 140]), + "consciousness": "A" if r.random() > 0.12 * (1 + 2 * sick) else r.choice("CVPU"), + "temperature": pick([36.1, 36.4, 36.8, 37.0, 37.2, 37.6, 38.0], [34.8, 35.0, 35.1, 35.6, 36.0, 38.1, 38.5, 39.0, 39.1, 39.6])} + +def gen_news2(seed, d): + r = rng_for(ENV + "/news2", seed, d) + n = {1: 5, 2: 9, 3: 14}[d] + sets = {1: 1, 2: 2, 3: 3}[d] + times = ["06:00", "10:00", "14:00"][:sets] + pids = ["P%02d" % i for i in r.sample(range(1, 40), n)] + rows, latest, prev = [], {}, {} + for p in pids: + sick = r.choice([0.05, 0.15, 0.3, 0.5, 0.7]) + scale = None + for t in times: + o = obs(r, sick) + if scale is None: scale = o["spo2_scale"] + o["spo2_scale"] = scale + if scale == 1 and o["spo2"] < 88: o["spo2"] = 88 + rows.append(dict(patient_id=p, time=t, **o)) + prev[p] = latest.get(p); latest[p] = o + r.shuffle(rows) # the chart is not sorted: the agent must find the latest set + header = ["patient_id", "time", "resp_rate", "spo2", "spo2_scale", "on_oxygen", "systolic_bp", "pulse", "consciousness", "temperature"] + res = {p: news2(latest[p]) for p in pids} + checks = [] + for p in sorted(pids): + checks += [c_int("patients.%s.score" % p, res[p][0]), c_str("patients.%s.band" % p, res[p][1])] + review = sorted(p for p in pids if res[p][1] in ("medium", "high")) + checks.append(c_set("medium_or_high", review, weight=2)) + extra = "" + if d >= 2: + rising = sorted(p for p in pids if news2(latest[p])[0] - news2(prev[p])[0] >= 2) + checks.append(c_set("rising", rising, weight=2)) + extra = '\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it.' + inst = """# Ward round: early-warning scores + +`observations.csv` holds the observation sets charted on the ward today%s. `news2_rules.md` gives the scoring rules. + +For every patient, score their **latest** observation set and work out the response band. + +Write `answer.json` in this folder, a JSON object with: + +- `patients`: an object keyed by patient id. Each value is `{"score": , "band": ""}`. +- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).%s +""" % ("" if sets == 1 else " (%d sets per patient, in no particular order)" % sets, extra) + return Task(ENV, "news2", seed, d, "Early-warning scores for %d patients" % n, inst, + {"observations.csv": to_csv(rows, header), "news2_rules.md": RULES}, checks, {"patients": n}) + +# ---------------------------------------------------------------- dosing +DRUGS = [("paracetamol", 15, 1000, [10]), ("gentamicin", 5, 400, [40, 10]), ("vancomycin", 15, 2000, [50]), ("amoxicillin", 25, 1000, [50, 100]), + ("morphine", 0.1, 10, [1, 10]), ("ondansetron", 0.15, 8, [2]), ("ceftriaxone", 50, 2000, [100]), ("furosemide", 1, 80, [10]), + ("aciclovir", 10, 800, [25]), ("flucloxacillin", 25, 2000, [50, 100])] + +def dose_mg(per_kg, weight, cap): return min(per_kg * weight, cap) +def pump_rate(bag_ml, minutes): return bag_ml * 60.0 / minutes +def drip_rate(bag_ml, drop_factor, minutes): return bag_ml * drop_factor / float(minutes) +def urine_rate(urine_ml, weight): return urine_ml / (weight * 24.0) + +def gen_dosing(seed, d): + r = rng_for(ENV + "/dosing", seed, d) + n = {1: 4, 2: 7, 3: 10}[d] + orders, checks = [], [] + for i in range(1, n + 1): + while True: + drug, per_kg, cap, strengths = r.choice(DRUGS) + w = r.choice([x / 2 for x in range(12, 220)]) # 6.0 to 109.5 kg in 0.5 steps + raw = per_kg * w + if abs(raw - cap) > 0.02 * cap: break # keep clear of the cap + dose = dose_mg(per_kg, w, cap) + strength = r.choice(strengths) + vol = dose / strength + oid = "RX%02d" % i + o = {"order_id": oid, "drug": drug, "weight_kg": w, "dose_mg_per_kg": per_kg, "max_single_dose_mg": cap, "stock_mg_per_ml": strength} + checks += [c_num("orders.%s.dose_mg" % oid, dose, 2), c_num("orders.%s.volume_ml" % oid, vol, 2)] + if d >= 2: + bag = r.choice([50, 100, 250, 500, 1000]) + mins = r.choice([20, 30, 45, 60, 90, 120, 240, 480]) + o.update(bag_volume_ml=bag, infuse_over_min=mins) + checks.append(c_num("orders.%s.pump_rate_ml_per_h" % oid, pump_rate(bag, mins), 1)) + if d >= 3: + while True: + df = r.choice([10, 15, 20, 60]) + gtt = drip_rate(o["bag_volume_ml"], df, o["infuse_over_min"]) + if abs(gtt - round(gtt)) < 1e-9 or abs(gtt % 1 - 0.5) > 0.03: break # no near-half cases + o["drop_factor_gtt_per_ml"] = df + checks.append(c_int("orders.%s.drops_per_min" % oid, int(half_up(gtt)))) + orders.append(o) + header = list(orders[0].keys()) + lines = ["- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.", + "- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals."] + how = "Give the drug as a single dose drawn up from the stock solution." + if d >= 2: + lines.append("- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.") + how = "Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it." + if d >= 3: + lines.append("- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).") + inst = """# Ward round: doses and infusions + +`orders.csv` lists today's weight-based medication orders. %s + +Write `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give: + +%s + +Numbers are accepted within one unit of the last decimal place asked for. +""" % (how, "\n".join(lines)) + return Task(ENV, "dosing", seed, d, "Doses and infusion rates for %d orders" % n, inst, {"orders.csv": to_csv(orders, header)}, checks, {"orders": n}) + +# ---------------------------------------------------------------- fluid balance +IN = [("oral", [100, 150, 200, 250]), ("iv", [250, 500, 1000]), ("enteral feed", [200, 300, 400]), ("iv flush", [10, 20])] +OUT = [("urine", [150, 200, 250, 300, 350, 400, 450]), ("drain", [30, 50, 80, 120]), ("vomit", [100, 150, 250]), ("stool", [200, 300])] + +def gen_fluid(seed, d): + r = rng_for(ENV + "/fluid-balance", seed, d) + n = {1: 3, 2: 5, 3: 8}[d] + pids = ["P%02d" % i for i in r.sample(range(1, 40), n)] + while True: + rows, pats, res, ok = [], [], {}, True + for p in pids: + w = r.choice(range(48, 111)) + low = r.random() < 0.4 # low urine output + tin = tout = urine = 0 + for _ in range(r.randint(4, 6) + 2 * d): + kind, vols = r.choice(IN); v = r.choice(vols); tin += v + rows.append({"patient_id": p, "day": "today", "time": "%02d:%02d" % (r.randint(0, 23), r.choice([0, 15, 30, 45])), "direction": "in", "type": kind, "volume_ml": v}) + n_out = r.randint(2, 3) if low else r.randint(5, 8) + for j in range(n_out + d): + kind, vols = ("urine", [80, 100, 120, 150] if low else OUT[0][1]) if j < n_out else r.choice(OUT[1:]) + v = r.choice(vols); tout += v; urine += v if kind == "urine" else 0 + rows.append({"patient_id": p, "day": "today", "time": "%02d:%02d" % (r.randint(0, 23), r.choice([0, 15, 30, 45])), "direction": "out", "type": kind, "volume_ml": v}) + if d >= 2: # entries from the previous day must be left out + for _ in range(r.randint(1, 3)): + kind, vols = r.choice(IN + OUT) + rows.append({"patient_id": p, "day": "yesterday", "time": "%02d:%02d" % (r.randint(18, 23), r.choice([0, 30])), + "direction": "in" if (kind, vols) in IN else "out", "type": kind, "volume_ml": r.choice(vols)}) + rate = urine_rate(urine, w) + if abs(rate - 0.5) < 0.04: ok = False # keep clear of the oliguria threshold + pats.append({"patient_id": p, "weight_kg": w}) + res[p] = (tin, tout, tin - tout, rate) + if ok: break + r.shuffle(rows) + checks = [] + for p in sorted(pids): + tin, tout, bal, rate = res[p] + checks += [c_int("patients.%s.intake_ml" % p, tin), c_int("patients.%s.output_ml" % p, tout), c_int("patients.%s.balance_ml" % p, bal)] + if d >= 2: checks.append(c_num("patients.%s.urine_ml_per_kg_per_h" % p, rate, 2)) + checks.append(c_set("oliguria", sorted(p for p in pids if res[p][3] < 0.5), weight=2)) + more = "\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals." if d >= 2 else "" + note = " The chart also carries some entries from yesterday; leave those out." if d >= 2 else "" + inst = """# Ward round: 24-hour fluid balance + +`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).%s + +Write `answer.json` in this folder, a JSON object with: + +- `patients`: an object keyed by patient id, each with + - `intake_ml`: total of all `in` entries, as an integer. + - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer. + - `balance_ml`: intake minus output (negative if output is larger).%s +- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none). +""" % (note, more) + return Task(ENV, "fluid-balance", seed, d, "Fluid balance for %d patients" % n, inst, + {"fluid_chart.csv": to_csv(rows, ["patient_id", "day", "time", "direction", "type", "volume_ml"]), + "patients.csv": to_csv(pats, ["patient_id", "weight_kg"])}, checks, {"patients": n}) + +FAMILIES = {"news2": gen_news2, "dosing": gen_dosing, "fluid-balance": gen_fluid} + +def generate(seed, difficulty, family=None): + fam = family or sorted(FAMILIES)[seed % len(FAMILIES)] + return FAMILIES[fam](seed, difficulty) diff --git a/envs/ward_round/oracle.py b/envs/ward_round/oracle.py new file mode 100644 index 0000000000000000000000000000000000000000..9488110a1a8f3218453e245a9fa982d9eb57c3cf --- /dev/null +++ b/envs/ward_round/oracle.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python3 +"""Reference solution for Ward Round. Works only from the files in the current directory.""" +import csv, json, os +from decimal import Decimal, ROUND_HALF_UP + +def rows(name): + with open(name, newline="") as f: return list(csv.DictReader(f)) + +def band_score(v, cuts): + """cuts: list of (upper bound inclusive, score); the last bound is None.""" + for hi, s in cuts: + if hi is None or v <= hi: return s + +def news2(): + latest, sets = {}, {} + for r in rows("observations.csv"): + sets.setdefault(r["patient_id"], []).append(r) + out, totals_prev = {}, {} + def score(r): + o2 = r["on_oxygen"] == "yes"; spo2 = int(r["spo2"]) + if r["spo2_scale"] == "1": sp = band_score(spo2, [(91, 3), (93, 2), (95, 1), (None, 0)]) + elif spo2 <= 92 or not o2: sp = band_score(spo2, [(83, 3), (85, 2), (87, 1), (None, 0)]) + else: sp = band_score(spo2, [(94, 1), (96, 2), (None, 3)]) + parts = [band_score(int(r["resp_rate"]), [(8, 3), (11, 1), (20, 0), (24, 2), (None, 3)]), sp, 2 if o2 else 0, + band_score(int(r["systolic_bp"]), [(90, 3), (100, 2), (110, 1), (219, 0), (None, 3)]), + band_score(int(r["pulse"]), [(40, 3), (50, 1), (90, 0), (110, 1), (130, 2), (None, 3)]), + 0 if r["consciousness"] == "A" else 3, + band_score(Decimal(r["temperature"]), [(Decimal("35.0"), 3), (Decimal("36.0"), 1), (Decimal("38.0"), 0), (Decimal("39.0"), 1), (None, 2)])] + t = sum(parts) + return t, ("high" if t >= 7 else "medium" if t >= 5 else "low-medium" if 3 in parts else "low") + ans = {"patients": {}, "medium_or_high": []} + rising, multi = [], False + for p, rs in sets.items(): + rs.sort(key=lambda r: r["time"]) + t, b = score(rs[-1]) + ans["patients"][p] = {"score": t, "band": b} + if b in ("medium", "high"): ans["medium_or_high"].append(p) + if len(rs) > 1: + multi = True + if t - score(rs[-2])[0] >= 2: rising.append(p) + if multi: ans["rising"] = rising + return ans + +def dosing(): + ans = {"orders": {}} + for r in rows("orders.csv"): + dose = min(Decimal(r["dose_mg_per_kg"]) * Decimal(r["weight_kg"]), Decimal(r["max_single_dose_mg"])) + o = {"dose_mg": round(float(dose), 2), "volume_ml": round(float(dose / Decimal(r["stock_mg_per_ml"])), 2)} + if r.get("bag_volume_ml"): + o["pump_rate_ml_per_h"] = round(float(Decimal(r["bag_volume_ml"]) * 60 / Decimal(r["infuse_over_min"])), 1) + if r.get("drop_factor_gtt_per_ml"): + gtt = Decimal(r["bag_volume_ml"]) * Decimal(r["drop_factor_gtt_per_ml"]) / Decimal(r["infuse_over_min"]) + o["drops_per_min"] = int(gtt.quantize(Decimal(1), rounding=ROUND_HALF_UP)) + ans["orders"][r["order_id"]] = o + return ans + +def fluid(): + weight = {r["patient_id"]: float(r["weight_kg"]) for r in rows("patients.csv")} + tot = {p: {"in": 0, "out": 0, "urine": 0} for p in weight} + for r in rows("fluid_chart.csv"): + if r["day"] != "today": continue + v = int(r["volume_ml"]); t = tot[r["patient_id"]] + t[r["direction"]] += v + if r["type"] == "urine": t["urine"] += v + ans = {"patients": {}, "oliguria": []} + for p, t in tot.items(): + rate = t["urine"] / (weight[p] * 24.0) + ans["patients"][p] = {"intake_ml": t["in"], "output_ml": t["out"], "balance_ml": t["in"] - t["out"], "urine_ml_per_kg_per_h": round(rate, 2)} + if rate < 0.5: ans["oliguria"].append(p) + return ans + +if os.path.exists("observations.csv"): answer = news2() +elif os.path.exists("orders.csv"): answer = dosing() +else: answer = fluid() +with open("answer.json", "w") as f: json.dump(answer, f, indent=1) diff --git a/envs/zoning_check/__init__.py b/envs/zoning_check/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/envs/zoning_check/env.toml b/envs/zoning_check/env.toml new file mode 100644 index 0000000000000000000000000000000000000000..831573321f881eeb20f56d608c446c20e0961dab --- /dev/null +++ b/envs/zoning_check/env.toml @@ -0,0 +1,7 @@ +name = "zoning-check" +title = "Zoning Check" +isced = "0731" +summary = "Check building proposals against a fictional town's zoning code: floor area ratio, coverage, setbacks, parking, plot capacity and areas from coordinates." +task_type = "rule compliance check" +good_for = ["Applying a written code to structured records", "Plane geometry from coordinate lists", "Finding the binding constraint among several limits"] +families = ["compliance", "capacity", "geometry", "mixed-use"] diff --git a/envs/zoning_check/gen.py b/envs/zoning_check/gen.py new file mode 100644 index 0000000000000000000000000000000000000000..7c55da73720ca9d750f114e3a1a968dfd177aa99 --- /dev/null +++ b/envs/zoning_check/gen.py @@ -0,0 +1,76 @@ +"""Synthetic planning exercises using a fictional code supplied with every task. +Geometry uses the shoelace identity; all code limits are invented, not legal guidance. +""" +import math +from practice.core import Task, rng_for, to_csv, to_json, c_num, c_int, c_set, c_str +ENV='zoning-check' +RULES={'max_far':1.2,'max_coverage':0.4,'setback_m':4,'height_m':15,'parking_area_m2':25,'parking_per_dwelling':1.5,'shop_m2_per_space':40,'office_m2_per_space':60} + +def polygon_area(points): + return abs(sum(x*points[(i+1)%len(points)][1]-points[(i+1)%len(points)][0]*y for i,(x,y) in enumerate(points)))/2 + +def capacity(width,depth,storeys,code=RULES): + area=width*depth + candidates={'far':area*code['max_far'],'coverage':area*code['max_coverage']*storeys,'setbacks':max(0,width-2*code['setback_m'])*max(0,depth-2*code['setback_m'])*storeys} + binding=min(candidates,key=lambda k:(candidates[k],k)) + return candidates[binding],binding,candidates + +def parking(dwelling,shop,office,code=RULES): + return math.ceil(dwelling*code['parking_per_dwelling']+shop/code['shop_m2_per_space']+office/code['office_m2_per_space']) + +def compliance(row,code=RULES): + site=row['width_m']*row['depth_m']; far=row['gross_floor_m2']/site; coverage=row['footprint_m2']/site + violations=[] + if far>code['max_far']: violations.append('far') + if coverage>code['max_coverage']: violations.append('coverage') + if min(row[k] for k in ['front_m','rear_m','left_m','right_m'])code['height_m']: violations.append('height') + return site,far,coverage,violations + +def generate(seed,difficulty,family=None): + families=sorted(FAMILIES); family=family or families[seed%len(families)]; d=difficulty + r=rng_for(ENV+'/'+family,seed,d); files={'zoning_code.json':to_json(RULES)}; checks=[] + intro='# Zoning Check: '+family+'\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. ' + end='\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. ' + if family=='compliance': + rows=[] + for i in range(2+d): + w,depth=r.randint(20,60),r.randint(25,70); area=w*depth + row={'proposal_id':'P%02d'%i,'width_m':w,'depth_m':depth,'gross_floor_m2':round(area*r.choice([.8,1,1.4,1.6]),2),'footprint_m2':round(area*r.choice([.25,.3,.5,.6]),2),'height_m':r.choice([9,12,18,21]),'front_m':r.choice([2,5,7]),'rear_m':r.choice([3,6,8]),'left_m':r.choice([2,5,9]),'right_m':r.choice([3,6,7]),'architect':'Studio %s'%r.choice(['Elm','Ash','Oak'])} + rows.append(row); site,far,cov,bad=compliance(row); pre='proposals.'+row['proposal_id']+'.' + checks += [c_num(pre+'site_m2',site,2),c_num(pre+'far',far,2),c_num(pre+'coverage_percent',100*cov,2),c_set(pre+'violations',bad,weight=2)] + r.shuffle(rows); files['proposals.csv']=to_csv(rows,list(rows[0])) + instruction=intro+'`proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.'+end+'`proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list).' + elif family=='capacity': + rows=[] + for i in range(2+d): + while True: + w,depth=r.randint(12,65),r.randint(12,75); storeys=r.randint(1,4); maxarea,binding,candidates=capacity(w,depth,storeys) + vals=sorted(candidates.values()) + if vals[1]-vals[0]>1: break + row={'plot_id':'L%02d'%i,'width_m':w,'depth_m':depth,'storeys':storeys}; rows.append(row); pre='plots.'+row['plot_id']+'.' + checks += [c_num(pre+'max_floor_m2',maxarea,2),c_str(pre+'binding',binding)] + for k,v in candidates.items(): checks.append(c_num(pre+k+'_limit_m2',v,2)) + r.shuffle(rows); files['plots.csv']=to_csv(rows,list(rows[0])) + instruction=intro+'Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.'+end+'`plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres.' + elif family=='geometry': + shapes={}; rows=[] + for i in range(2+d): + w,h=r.randint(20,70),r.randint(20,70); a,b=r.randint(4,w//2),r.randint(4,h//2); x,y=r.randint(-30,30),r.randint(-30,30) + points=[(0,0),(w,0),(w,b),(a,b),(a,h),(0,h)] if d>=2 else [(0,0),(w,0),(w,h),(0,h)] + if d==3: points.reverse() + points=[(u+x,v+y) for u,v in points]; pid='G%02d'%i; shapes[pid]=points; floor=r.randint(100,900); footprint=r.randint(90,300); rows.append({'plot_id':pid,'floor_m2':floor,'footprint_m2':footprint}); area=polygon_area(points); pre='plots.'+pid+'.' + checks += [c_num(pre+'site_m2',area,2),c_num(pre+'far',floor/area,2),c_num(pre+'coverage_percent',100*footprint/area,2)] + files['boundaries.json']=to_json(shapes); files['buildings.csv']=to_csv(rows,list(rows[0])) + instruction=intro+'`boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.'+end+'`plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area).' + else: + rows=[] + for i in range(2+d): + homes=r.randint(1,10); shop=20*r.randint(1,20); office=30*r.randint(1,20); spaces=parking(homes,shop,office); available=max(0,spaces+r.choice([-3,-2,2,3])); pid='M%02d'%i + rows.append({'proposal_id':pid,'dwellings':homes,'shop_m2':shop,'office_m2':office,'provided_spaces':available,'parking_surface_m2':25*available,'notes':'revised application' if d>1 else ''}); pre='proposals.'+pid+'.' + checks += [c_num(pre+'unrounded_spaces',homes*1.5+shop/40+office/60,2),c_int(pre+'required_spaces',spaces),c_int(pre+'shortfall',max(0,spaces-available)),c_num(pre+'required_parking_m2',spaces*25,2)] + r.shuffle(rows); files['uses.csv']=to_csv(rows,list(rows[0])) + instruction=intro+'`uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.'+end+'`proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`.' + return Task(ENV,family,seed,d,'Planning review: '+family,instruction,files,checks) + +FAMILIES=['compliance','capacity','geometry','mixed-use'] diff --git a/envs/zoning_check/oracle.py b/envs/zoning_check/oracle.py new file mode 100644 index 0000000000000000000000000000000000000000..74217b1a085163bad2f08f64018f024d04ebc018 --- /dev/null +++ b/envs/zoning_check/oracle.py @@ -0,0 +1,33 @@ +"""Independent file-based planning review under the supplied fictional code.""" +import csv,json,math +from pathlib import Path + +def read(name): + with open(name) as f: return list(csv.DictReader(f)) +def solve(): + c=json.loads(Path('zoning_code.json').read_text()); out={} + if Path('proposals.csv').exists(): + for r in read('proposals.csv'): + area=float(r['width_m'])*float(r['depth_m']); far=float(r['gross_floor_m2'])/area; cov=float(r['footprint_m2'])/area + bad=[k for k,fail in [('far',far>c['max_far']),('coverage',cov>c['max_coverage']),('height',float(r['height_m'])>c['height_m']),('setback',any(float(r[k])/ with + env.toml name, title, ISCED-F field, summary, families + gen.py generate(seed, difficulty) -> Task (computes the expected values from in-memory data) + oracle.py standalone script, standard library only: reads the task files in the current + directory as an agent would and writes answer.json. Must not import gen.py. + validators.py optional, standalone: custom checks for answers that are not unique +""" +import csv, io, json, random +from dataclasses import dataclass, field + +@dataclass +class Task: + env: str + family: str + seed: int + difficulty: int + title: str + instruction: str # Markdown shown to the agent. States every answer key, unit and rounding. + files: dict # relative path -> text, placed in the working directory (/app) + checks: list # hidden verifier spec, see practice/verify.py + meta: dict = field(default_factory=dict) + + @property + def id(self): + return "%s-%s-d%d-%04d" % (self.env, self.family, self.difficulty, self.seed) + +def rng_for(env, seed, difficulty): + return random.Random("%s|%d|%d" % (env, seed, difficulty)) + +def to_csv(rows, header): + buf = io.StringIO() + w = csv.writer(buf, lineterminator="\n") + w.writerow(header) + for r in rows: w.writerow([r[h] if isinstance(r, dict) else r[i] for i, h in enumerate(header)]) + return buf.getvalue() + +def to_json(obj): + return json.dumps(obj, indent=2, ensure_ascii=False) + "\n" + +# check builders ------------------------------------------------------------ +def c_int(path, value, weight=1.0): return {"path": path, "type": "int", "value": int(value), "weight": weight} +def c_num(path, value, decimals, weight=1.0): + """A number the instruction asks for to `decimals` places; accepted within one unit of the last place.""" + return {"path": path, "type": "number", "value": round(float(value), decimals), "abs_tol": 10 ** (-decimals), "weight": weight} +def c_str(path, value, weight=1.0): return {"path": path, "type": "str", "value": value, "weight": weight} +def c_bool(path, value, weight=1.0): return {"path": path, "type": "bool", "value": bool(value), "weight": weight} +def c_list(path, value, item="str", weight=1.0, abs_tol=None): + c = {"path": path, "type": "list", "value": list(value), "item": item, "weight": weight} + if abs_tol is not None: c["abs_tol"] = abs_tol + return c +def c_set(path, value, item="str", weight=1.0): return {"path": path, "type": "set", "value": sorted(value), "item": item, "weight": weight} +def c_custom(name, args, weight=1.0): return {"type": "custom", "name": name, "args": args, "weight": weight} + +def clear_of(value, thresholds, margin): + """True if value is at least `margin` away from every threshold: use to avoid knife-edge cases.""" + return all(abs(value - t) >= margin for t in thresholds) + +def half_up(x, decimals=0): + """Round half away from zero, the rule the instructions state (Python's round() is half-to-even).""" + from decimal import Decimal, ROUND_HALF_UP + q = Decimal(1).scaleb(-decimals) + return float(Decimal(repr(x)).quantize(q, rounding=ROUND_HALF_UP)) diff --git a/practice/verify.py b/practice/verify.py new file mode 100644 index 0000000000000000000000000000000000000000..e03124340b6015e692f6944976f4dedcadc0e722 --- /dev/null +++ b/practice/verify.py @@ -0,0 +1,116 @@ +#!/usr/bin/env python3 +"""Verifier for Renaissance Labs practice environments. Standard library only. + +Reads the agent's answer (a JSON object) and a list of checks, and writes a reward in [0, 1]. +The reward is the weighted share of checks that pass. A missing, unreadable or non-object +answer scores 0. Each check addresses one value in the answer by a dotted path. + +Check types + int exact integer (a float with integral value is accepted; booleans are not) + number within abs_tol of value (default 1e-9); booleans and strings are rejected + str equal after trimming and case-folding + bool exact boolean + list ordered list; items compared as int/number/str according to "item" (default str) + set unordered collection of distinct strings (or ints) + custom a function in validators.py: name(answer, args) -> bool or float in [0, 1] +""" +import argparse, json, math, os, sys + +MISSING = object() + +def lookup(obj, path): + cur = obj + for part in path.split("."): + if isinstance(cur, dict): + if part not in cur: return MISSING + cur = cur[part] + elif isinstance(cur, list): + try: cur = cur[int(part)] + except (ValueError, IndexError): return MISSING + else: + return MISSING + return cur + +def is_num(x): + return isinstance(x, (int, float)) and not isinstance(x, bool) and not (isinstance(x, float) and (math.isnan(x) or math.isinf(x))) + +def eq_int(got, want): + return is_num(got) and float(got) == float(int(got)) and int(got) == want + +def eq_num(got, want, tol): + return is_num(got) and abs(float(got) - float(want)) <= tol + 1e-12 + +def eq_str(got, want): + return isinstance(got, str) and got.strip().casefold() == str(want).strip().casefold() + +def eq_item(got, want, kind, tol): + if kind == "int": return eq_int(got, want) + if kind == "number": return eq_num(got, want, tol) + return eq_str(got, want) + +def run_check(answer, chk, validators): + t = chk["type"] + if t == "custom": + fn = getattr(validators, chk["name"], None) if validators else None + if fn is None: return 0.0 + try: r = fn(answer, chk.get("args", {})) + except Exception: return 0.0 + if r is True: return 1.0 + if r is False or r is None: return 0.0 + return max(0.0, min(1.0, float(r))) if is_num(r) else 0.0 + got = lookup(answer, chk["path"]) + if got is MISSING: return 0.0 + want, tol = chk["value"], chk.get("abs_tol", 1e-9) + if t == "int": ok = eq_int(got, want) + elif t == "number": ok = eq_num(got, want, tol) + elif t == "str": ok = eq_str(got, want) + elif t == "bool": ok = isinstance(got, bool) and got is want + elif t == "list": + ok = isinstance(got, list) and len(got) == len(want) and all(eq_item(g, w, chk.get("item", "str"), tol) for g, w in zip(got, want)) + elif t == "set": + kind = chk.get("item", "str") + if not isinstance(got, list): ok = False + else: + norm = (lambda x: x.strip().casefold() if isinstance(x, str) else None) if kind == "str" else (lambda x: int(x) if eq_int(x, int(x) if is_num(x) else 0) else None) + g = [norm(x) for x in got]; w = [norm(x) for x in want] + ok = None not in g and len(g) == len(set(g)) and set(g) == set(w) + else: ok = False + return 1.0 if ok else 0.0 + +def grade(answer, checks, validators=None): + """Return (reward, details). answer is the parsed JSON, or None if it could not be read.""" + if not isinstance(answer, dict): + return 0.0, [{"check": c.get("path", c.get("name")), "score": 0.0} for c in checks] + total = sum(c.get("weight", 1.0) for c in checks) + got, details = 0.0, [] + for c in checks: + s = run_check(answer, c, validators) + got += s * c.get("weight", 1.0) + details.append({"check": c.get("path", c.get("name")), "score": s}) + return (round(got / total, 6) if total else 0.0), details + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("--answer", default="/app/answer.json") + ap.add_argument("--checks", default=os.path.join(os.path.dirname(os.path.abspath(__file__)), "checks.json")) + ap.add_argument("--out", default="/logs/verifier") + a = ap.parse_args() + checks = json.load(open(a.checks)) + try: + with open(a.answer) as f: answer = json.load(f) + except Exception: + answer = None + validators = None + here = os.path.dirname(os.path.abspath(__file__)) + if os.path.exists(os.path.join(here, "validators.py")): + sys.path.insert(0, here) + import validators # noqa + reward, details = grade(answer, checks, validators) + os.makedirs(a.out, exist_ok=True) + with open(os.path.join(a.out, "reward.txt"), "w") as f: f.write(str(reward)) + with open(os.path.join(a.out, "reward.json"), "w") as f: + json.dump({"reward": reward, "solved": reward == 1.0, "passed": sum(1 for d in details if d["score"] == 1.0), "checks": len(details)}, f) + print("reward", reward) + +if __name__ == "__main__": + main() diff --git a/tasks.jsonl b/tasks.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..9f760f5752ab193ff957d81805e36b117a3fdbc8 --- /dev/null +++ b/tasks.jsonl @@ -0,0 +1,1404 @@ +{"id": "argument-check-consistency-d1-t0000", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "split": "train", "seed": 0, "path": "tasks/argument-check/argument-check-consistency-d1-t0000", "title": "Consistency of 4 sets of sentences", "checks": 15, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d1-t0001", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "split": "train", "seed": 1, "path": "tasks/argument-check/argument-check-equivalence-d1-t0001", "title": "Equivalence of 5 pairs of formulas", "checks": 18, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order)."} +{"id": "argument-check-validity-d1-t0002", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "split": "train", "seed": 2, "path": "tasks/argument-check/argument-check-validity-d1-t0002", "title": "Validity of 5 arguments", "checks": 18, "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d2-t0003", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "split": "train", "seed": 3, "path": "tasks/argument-check/argument-check-consistency-d2-t0003", "title": "Consistency of 6 sets of sentences", "checks": 28, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d2-t0004", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "split": "train", "seed": 4, "path": "tasks/argument-check/argument-check-equivalence-d2-t0004", "title": "Equivalence of 6 pairs of formulas", "checks": 24, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted."} +{"id": "argument-check-validity-d2-t0005", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "split": "train", "seed": 5, "path": "tasks/argument-check/argument-check-validity-d2-t0005", "title": "Validity of 8 arguments", "checks": 29, "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d3-t0006", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "split": "train", "seed": 6, "path": "tasks/argument-check/argument-check-consistency-d3-t0006", "title": "Consistency of 7 sets of sentences", "checks": 37, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d3-t0007", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "split": "train", "seed": 7, "path": "tasks/argument-check/argument-check-equivalence-d3-t0007", "title": "Equivalence of 6 pairs of formulas", "checks": 38, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form."} +{"id": "argument-check-validity-d3-t0008", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "split": "train", "seed": 8, "path": "tasks/argument-check/argument-check-validity-d3-t0008", "title": "Validity of 9 arguments", "checks": 37, "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d1-t0009", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "split": "train", "seed": 9, "path": "tasks/argument-check/argument-check-consistency-d1-t0009", "title": "Consistency of 4 sets of sentences", "checks": 15, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d1-t0010", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "split": "train", "seed": 10, "path": "tasks/argument-check/argument-check-equivalence-d1-t0010", "title": "Equivalence of 5 pairs of formulas", "checks": 18, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order)."} +{"id": "argument-check-validity-d1-t0011", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "split": "train", "seed": 11, "path": "tasks/argument-check/argument-check-validity-d1-t0011", "title": "Validity of 5 arguments", "checks": 19, "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d2-t0012", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "split": "train", "seed": 12, "path": "tasks/argument-check/argument-check-consistency-d2-t0012", "title": "Consistency of 6 sets of sentences", "checks": 28, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d2-t0013", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "split": "train", "seed": 13, "path": "tasks/argument-check/argument-check-equivalence-d2-t0013", "title": "Equivalence of 6 pairs of formulas", "checks": 24, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted."} +{"id": "argument-check-validity-d2-t0014", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "split": "train", "seed": 14, "path": "tasks/argument-check/argument-check-validity-d2-t0014", "title": "Validity of 8 arguments", "checks": 29, "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d3-t0015", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "split": "train", "seed": 15, "path": "tasks/argument-check/argument-check-consistency-d3-t0015", "title": "Consistency of 7 sets of sentences", "checks": 37, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d3-t0016", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "split": "train", "seed": 16, "path": "tasks/argument-check/argument-check-equivalence-d3-t0016", "title": "Equivalence of 6 pairs of formulas", "checks": 38, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form."} +{"id": "argument-check-validity-d3-t0017", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "split": "train", "seed": 17, "path": "tasks/argument-check/argument-check-validity-d3-t0017", "title": "Validity of 9 arguments", "checks": 37, "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d1-t0018", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "split": "train", "seed": 18, "path": "tasks/argument-check/argument-check-consistency-d1-t0018", "title": "Consistency of 4 sets of sentences", "checks": 15, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d1-t0019", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "split": "train", "seed": 19, "path": "tasks/argument-check/argument-check-equivalence-d1-t0019", "title": "Equivalence of 5 pairs of formulas", "checks": 18, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order)."} +{"id": "argument-check-validity-d1-t0020", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "split": "train", "seed": 20, "path": "tasks/argument-check/argument-check-validity-d1-t0020", "title": "Validity of 5 arguments", "checks": 19, "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d2-t0021", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "split": "train", "seed": 21, "path": "tasks/argument-check/argument-check-consistency-d2-t0021", "title": "Consistency of 6 sets of sentences", "checks": 28, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d2-t0022", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "split": "train", "seed": 22, "path": "tasks/argument-check/argument-check-equivalence-d2-t0022", "title": "Equivalence of 6 pairs of formulas", "checks": 24, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted."} +{"id": "argument-check-validity-d2-t0023", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "split": "train", "seed": 23, "path": "tasks/argument-check/argument-check-validity-d2-t0023", "title": "Validity of 8 arguments", "checks": 29, "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d3-t0024", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "split": "train", "seed": 24, "path": "tasks/argument-check/argument-check-consistency-d3-t0024", "title": "Consistency of 7 sets of sentences", "checks": 35, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d3-t0025", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "split": "train", "seed": 25, "path": "tasks/argument-check/argument-check-equivalence-d3-t0025", "title": "Equivalence of 6 pairs of formulas", "checks": 38, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form."} +{"id": "argument-check-validity-d3-t0026", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "split": "train", "seed": 26, "path": "tasks/argument-check/argument-check-validity-d3-t0026", "title": "Validity of 9 arguments", "checks": 37, "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d1-t0027", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "split": "train", "seed": 27, "path": "tasks/argument-check/argument-check-consistency-d1-t0027", "title": "Consistency of 4 sets of sentences", "checks": 15, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d1-t0028", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "split": "train", "seed": 28, "path": "tasks/argument-check/argument-check-equivalence-d1-t0028", "title": "Equivalence of 5 pairs of formulas", "checks": 18, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order)."} +{"id": "argument-check-validity-d1-t0029", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "split": "train", "seed": 29, "path": "tasks/argument-check/argument-check-validity-d1-t0029", "title": "Validity of 5 arguments", "checks": 19, "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d2-t0030", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "split": "train", "seed": 30, "path": "tasks/argument-check/argument-check-consistency-d2-t0030", "title": "Consistency of 6 sets of sentences", "checks": 28, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d2-t0031", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "split": "train", "seed": 31, "path": "tasks/argument-check/argument-check-equivalence-d2-t0031", "title": "Equivalence of 6 pairs of formulas", "checks": 24, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted."} +{"id": "argument-check-validity-d2-t0032", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "split": "train", "seed": 32, "path": "tasks/argument-check/argument-check-validity-d2-t0032", "title": "Validity of 8 arguments", "checks": 29, "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d3-t0033", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "split": "train", "seed": 33, "path": "tasks/argument-check/argument-check-consistency-d3-t0033", "title": "Consistency of 7 sets of sentences", "checks": 37, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d3-t0034", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "split": "train", "seed": 34, "path": "tasks/argument-check/argument-check-equivalence-d3-t0034", "title": "Equivalence of 6 pairs of formulas", "checks": 38, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form."} +{"id": "argument-check-validity-d3-t0035", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "split": "train", "seed": 35, "path": "tasks/argument-check/argument-check-validity-d3-t0035", "title": "Validity of 9 arguments", "checks": 37, "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d1-t0036", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "split": "train", "seed": 36, "path": "tasks/argument-check/argument-check-consistency-d1-t0036", "title": "Consistency of 4 sets of sentences", "checks": 15, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d1-t0037", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "split": "train", "seed": 37, "path": "tasks/argument-check/argument-check-equivalence-d1-t0037", "title": "Equivalence of 5 pairs of formulas", "checks": 19, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order)."} +{"id": "argument-check-validity-d1-t0038", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "split": "train", "seed": 38, "path": "tasks/argument-check/argument-check-validity-d1-t0038", "title": "Validity of 5 arguments", "checks": 19, "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d2-t0039", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "split": "train", "seed": 39, "path": "tasks/argument-check/argument-check-consistency-d2-t0039", "title": "Consistency of 6 sets of sentences", "checks": 28, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d2-t0040", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "split": "train", "seed": 40, "path": "tasks/argument-check/argument-check-equivalence-d2-t0040", "title": "Equivalence of 6 pairs of formulas", "checks": 24, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted."} +{"id": "argument-check-validity-d2-t0041", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "split": "train", "seed": 41, "path": "tasks/argument-check/argument-check-validity-d2-t0041", "title": "Validity of 8 arguments", "checks": 29, "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d3-t0042", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "split": "train", "seed": 42, "path": "tasks/argument-check/argument-check-consistency-d3-t0042", "title": "Consistency of 7 sets of sentences", "checks": 35, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d3-t0043", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "split": "train", "seed": 43, "path": "tasks/argument-check/argument-check-equivalence-d3-t0043", "title": "Equivalence of 6 pairs of formulas", "checks": 38, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form."} +{"id": "argument-check-validity-d3-t0044", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "split": "train", "seed": 44, "path": "tasks/argument-check/argument-check-validity-d3-t0044", "title": "Validity of 9 arguments", "checks": 37, "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d1-t0045", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "split": "train", "seed": 45, "path": "tasks/argument-check/argument-check-consistency-d1-t0045", "title": "Consistency of 4 sets of sentences", "checks": 15, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d1-t0046", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "split": "train", "seed": 46, "path": "tasks/argument-check/argument-check-equivalence-d1-t0046", "title": "Equivalence of 5 pairs of formulas", "checks": 19, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order)."} +{"id": "argument-check-validity-d1-t0047", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "split": "train", "seed": 47, "path": "tasks/argument-check/argument-check-validity-d1-t0047", "title": "Validity of 5 arguments", "checks": 18, "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d2-t0048", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "split": "train", "seed": 48, "path": "tasks/argument-check/argument-check-consistency-d2-t0048", "title": "Consistency of 6 sets of sentences", "checks": 28, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d2-t0049", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "split": "train", "seed": 49, "path": "tasks/argument-check/argument-check-equivalence-d2-t0049", "title": "Equivalence of 6 pairs of formulas", "checks": 24, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted."} +{"id": "argument-check-validity-d2-t0050", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "split": "train", "seed": 50, "path": "tasks/argument-check/argument-check-validity-d2-t0050", "title": "Validity of 8 arguments", "checks": 29, "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d3-t0051", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "split": "train", "seed": 51, "path": "tasks/argument-check/argument-check-consistency-d3-t0051", "title": "Consistency of 7 sets of sentences", "checks": 37, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d3-t0052", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "split": "train", "seed": 52, "path": "tasks/argument-check/argument-check-equivalence-d3-t0052", "title": "Equivalence of 6 pairs of formulas", "checks": 38, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form."} +{"id": "argument-check-validity-d3-t0053", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "split": "train", "seed": 53, "path": "tasks/argument-check/argument-check-validity-d3-t0053", "title": "Validity of 9 arguments", "checks": 37, "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d1-t0054", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "split": "train", "seed": 54, "path": "tasks/argument-check/argument-check-consistency-d1-t0054", "title": "Consistency of 4 sets of sentences", "checks": 15, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d1-t0055", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "split": "train", "seed": 55, "path": "tasks/argument-check/argument-check-equivalence-d1-t0055", "title": "Equivalence of 5 pairs of formulas", "checks": 18, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order)."} +{"id": "argument-check-validity-d1-t0056", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "split": "train", "seed": 56, "path": "tasks/argument-check/argument-check-validity-d1-t0056", "title": "Validity of 5 arguments", "checks": 19, "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d2-t0057", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "split": "train", "seed": 57, "path": "tasks/argument-check/argument-check-consistency-d2-t0057", "title": "Consistency of 6 sets of sentences", "checks": 28, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d2-t0058", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "split": "train", "seed": 58, "path": "tasks/argument-check/argument-check-equivalence-d2-t0058", "title": "Equivalence of 6 pairs of formulas", "checks": 24, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted."} +{"id": "argument-check-validity-d2-t0059", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "split": "train", "seed": 59, "path": "tasks/argument-check/argument-check-validity-d2-t0059", "title": "Validity of 8 arguments", "checks": 29, "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d3-t0060", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "split": "train", "seed": 60, "path": "tasks/argument-check/argument-check-consistency-d3-t0060", "title": "Consistency of 7 sets of sentences", "checks": 37, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d3-t0061", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "split": "train", "seed": 61, "path": "tasks/argument-check/argument-check-equivalence-d3-t0061", "title": "Equivalence of 6 pairs of formulas", "checks": 38, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form."} +{"id": "argument-check-validity-d3-t0062", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "split": "train", "seed": 62, "path": "tasks/argument-check/argument-check-validity-d3-t0062", "title": "Validity of 9 arguments", "checks": 37, "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d1-t0063", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "split": "train", "seed": 63, "path": "tasks/argument-check/argument-check-consistency-d1-t0063", "title": "Consistency of 4 sets of sentences", "checks": 15, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d1-t0064", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "split": "train", "seed": 64, "path": "tasks/argument-check/argument-check-equivalence-d1-t0064", "title": "Equivalence of 5 pairs of formulas", "checks": 19, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order)."} +{"id": "argument-check-validity-d1-t0065", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "split": "train", "seed": 65, "path": "tasks/argument-check/argument-check-validity-d1-t0065", "title": "Validity of 5 arguments", "checks": 18, "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d2-t0066", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "split": "train", "seed": 66, "path": "tasks/argument-check/argument-check-consistency-d2-t0066", "title": "Consistency of 6 sets of sentences", "checks": 28, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d2-t0067", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "split": "train", "seed": 67, "path": "tasks/argument-check/argument-check-equivalence-d2-t0067", "title": "Equivalence of 6 pairs of formulas", "checks": 24, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted."} +{"id": "argument-check-validity-d2-t0068", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "split": "train", "seed": 68, "path": "tasks/argument-check/argument-check-validity-d2-t0068", "title": "Validity of 8 arguments", "checks": 29, "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d3-t0069", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "split": "train", "seed": 69, "path": "tasks/argument-check/argument-check-consistency-d3-t0069", "title": "Consistency of 7 sets of sentences", "checks": 35, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d3-t0070", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "split": "train", "seed": 70, "path": "tasks/argument-check/argument-check-equivalence-d3-t0070", "title": "Equivalence of 6 pairs of formulas", "checks": 38, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form."} +{"id": "argument-check-validity-d3-t0071", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "split": "train", "seed": 71, "path": "tasks/argument-check/argument-check-validity-d3-t0071", "title": "Validity of 9 arguments", "checks": 37, "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d1-t0072", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "split": "train", "seed": 72, "path": "tasks/argument-check/argument-check-consistency-d1-t0072", "title": "Consistency of 4 sets of sentences", "checks": 15, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d1-t0073", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "split": "train", "seed": 73, "path": "tasks/argument-check/argument-check-equivalence-d1-t0073", "title": "Equivalence of 5 pairs of formulas", "checks": 19, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order)."} +{"id": "argument-check-validity-d1-t0074", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "split": "train", "seed": 74, "path": "tasks/argument-check/argument-check-validity-d1-t0074", "title": "Validity of 5 arguments", "checks": 19, "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d2-t0075", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "split": "train", "seed": 75, "path": "tasks/argument-check/argument-check-consistency-d2-t0075", "title": "Consistency of 6 sets of sentences", "checks": 28, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d2-t0076", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "split": "train", "seed": 76, "path": "tasks/argument-check/argument-check-equivalence-d2-t0076", "title": "Equivalence of 6 pairs of formulas", "checks": 24, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted."} +{"id": "argument-check-validity-d2-t0077", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "split": "train", "seed": 77, "path": "tasks/argument-check/argument-check-validity-d2-t0077", "title": "Validity of 8 arguments", "checks": 29, "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d3-t0078", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "split": "train", "seed": 78, "path": "tasks/argument-check/argument-check-consistency-d3-t0078", "title": "Consistency of 7 sets of sentences", "checks": 37, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d3-t0079", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "split": "train", "seed": 79, "path": "tasks/argument-check/argument-check-equivalence-d3-t0079", "title": "Equivalence of 6 pairs of formulas", "checks": 38, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form."} +{"id": "argument-check-validity-d3-t0080", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "split": "train", "seed": 80, "path": "tasks/argument-check/argument-check-validity-d3-t0080", "title": "Validity of 9 arguments", "checks": 37, "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d1-t0081", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "split": "train", "seed": 81, "path": "tasks/argument-check/argument-check-consistency-d1-t0081", "title": "Consistency of 4 sets of sentences", "checks": 15, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d1-t0082", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "split": "train", "seed": 82, "path": "tasks/argument-check/argument-check-equivalence-d1-t0082", "title": "Equivalence of 5 pairs of formulas", "checks": 19, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order)."} +{"id": "argument-check-validity-d1-t0083", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "split": "train", "seed": 83, "path": "tasks/argument-check/argument-check-validity-d1-t0083", "title": "Validity of 5 arguments", "checks": 19, "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d1-e0000", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "split": "eval", "seed": 10000, "path": "tasks/argument-check/argument-check-consistency-d1-e0000", "title": "Consistency of 4 sets of sentences", "checks": 15, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d1-e0001", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "split": "eval", "seed": 10001, "path": "tasks/argument-check/argument-check-equivalence-d1-e0001", "title": "Equivalence of 5 pairs of formulas", "checks": 18, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order)."} +{"id": "argument-check-validity-d1-e0002", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "split": "eval", "seed": 10002, "path": "tasks/argument-check/argument-check-validity-d1-e0002", "title": "Validity of 5 arguments", "checks": 19, "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d2-e0003", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "split": "eval", "seed": 10003, "path": "tasks/argument-check/argument-check-consistency-d2-e0003", "title": "Consistency of 6 sets of sentences", "checks": 28, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d2-e0004", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "split": "eval", "seed": 10004, "path": "tasks/argument-check/argument-check-equivalence-d2-e0004", "title": "Equivalence of 6 pairs of formulas", "checks": 24, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted."} +{"id": "argument-check-validity-d2-e0005", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "split": "eval", "seed": 10005, "path": "tasks/argument-check/argument-check-validity-d2-e0005", "title": "Validity of 8 arguments", "checks": 29, "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d3-e0006", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "split": "eval", "seed": 10006, "path": "tasks/argument-check/argument-check-consistency-d3-e0006", "title": "Consistency of 7 sets of sentences", "checks": 35, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d3-e0007", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "split": "eval", "seed": 10007, "path": "tasks/argument-check/argument-check-equivalence-d3-e0007", "title": "Equivalence of 6 pairs of formulas", "checks": 38, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form."} +{"id": "argument-check-validity-d3-e0008", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "split": "eval", "seed": 10008, "path": "tasks/argument-check/argument-check-validity-d3-e0008", "title": "Validity of 9 arguments", "checks": 37, "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d1-e0009", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "split": "eval", "seed": 10009, "path": "tasks/argument-check/argument-check-consistency-d1-e0009", "title": "Consistency of 4 sets of sentences", "checks": 15, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d1-e0010", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "split": "eval", "seed": 10010, "path": "tasks/argument-check/argument-check-equivalence-d1-e0010", "title": "Equivalence of 5 pairs of formulas", "checks": 18, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order)."} +{"id": "argument-check-validity-d1-e0011", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "split": "eval", "seed": 10011, "path": "tasks/argument-check/argument-check-validity-d1-e0011", "title": "Validity of 5 arguments", "checks": 19, "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d2-e0012", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "split": "eval", "seed": 10012, "path": "tasks/argument-check/argument-check-consistency-d2-e0012", "title": "Consistency of 6 sets of sentences", "checks": 28, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d2-e0013", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "split": "eval", "seed": 10013, "path": "tasks/argument-check/argument-check-equivalence-d2-e0013", "title": "Equivalence of 6 pairs of formulas", "checks": 24, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted."} +{"id": "argument-check-validity-d2-e0014", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "split": "eval", "seed": 10014, "path": "tasks/argument-check/argument-check-validity-d2-e0014", "title": "Validity of 8 arguments", "checks": 29, "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d3-e0015", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 3, "split": "eval", "seed": 10015, "path": "tasks/argument-check/argument-check-consistency-d3-e0015", "title": "Consistency of 7 sets of sentences", "checks": 37, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 7 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n - `restoring`: for an unsatisfiable set only, the list of sentence numbers (1 for the first sentence in the file, 2 for the second, and so on) such that deleting that one sentence and keeping the others leaves a satisfiable set. Any order; an empty list if none.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d3-e0016", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 3, "split": "eval", "seed": 10016, "path": "tasks/argument-check/argument-check-equivalence-d3-e0016", "title": "Equivalence of 6 pairs of formulas", "checks": 38, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `left_only_rows`: the number of rows in which `left` is true and `right` is false, as an integer.\n - `relation`: one of `equivalent`, `left-entails-right` (not equivalent, and `right` is true in every row in which `left` is true), `right-entails-left` (not equivalent, and `left` is true in every row in which `right` is true) or `neither`.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted.\n- `dnf`: the same for disjunctive normal form."} +{"id": "argument-check-validity-d3-e0017", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 3, "split": "eval", "seed": 10017, "path": "tasks/argument-check/argument-check-validity-d3-e0017", "title": "Validity of 9 arguments", "checks": 37, "instruction": "# Argument check: validity\n\n`arguments.json` holds 9 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n - `essential_premises`: for a valid argument only, the list of premise numbers (1 for the first premise in the file, 2 for the second, and so on) that are essential as defined in the reference. Any order; an empty list if none.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d1-e0018", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 1, "split": "eval", "seed": 10018, "path": "tasks/argument-check/argument-check-consistency-d1-e0018", "title": "Consistency of 4 sets of sentences", "checks": 15, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 4 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d1-e0019", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 1, "split": "eval", "seed": 10019, "path": "tasks/argument-check/argument-check-equivalence-d1-e0019", "title": "Equivalence of 5 pairs of formulas", "checks": 18, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 5 pairs of formulas in propositional logic, `left` and `right`. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order)."} +{"id": "argument-check-validity-d1-e0020", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 1, "split": "eval", "seed": 10020, "path": "tasks/argument-check/argument-check-validity-d1-e0020", "title": "Validity of 5 arguments", "checks": 18, "instruction": "# Argument check: validity\n\n`arguments.json` holds 5 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "argument-check-consistency-d2-e0021", "env": "argument-check", "isced_f": "0223", "family": "consistency", "difficulty": 2, "split": "eval", "seed": 10021, "path": "tasks/argument-check/argument-check-consistency-d2-e0021", "title": "Consistency of 6 sets of sentences", "checks": 28, "instruction": "# Argument check: consistency\n\n`sentence_sets.json` holds 6 sets of sentences in propositional logic. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every set with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sets`: an object keyed by set id. For each set give\n - `satisfiable`: `true` or `false`.\n - `models`: the number of rows in which every sentence of the set is true, as an integer (0 if unsatisfiable).\n - `most_true_together`: the largest number of sentences of the set that are true in one and the same row, as an integer (for a satisfiable set this is the number of sentences).\n - `valuation`: for a satisfiable set, one model written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the set). Any model is accepted. For an unsatisfiable set give `null`.\n - `forced_true` and `forced_false`: for a satisfiable set only, the lists of atoms that are true in every model of the set and false in every model of the set (any order; empty lists if none).\n- `unsatisfiable_ids`: list of the ids of the unsatisfiable sets (any order)."} +{"id": "argument-check-equivalence-d2-e0022", "env": "argument-check", "isced_f": "0223", "family": "equivalence", "difficulty": 2, "split": "eval", "seed": 10022, "path": "tasks/argument-check/argument-check-equivalence-d2-e0022", "title": "Equivalence of 6 pairs of formulas", "checks": 24, "instruction": "# Argument check: equivalence\n\n`pairs.json` holds 6 pairs of formulas in propositional logic, `left` and `right`. `convert.json` holds 2 further formulas to rewrite in normal form. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nCompare the two formulas of every pair with a full truth table over the atoms that occur in either of them.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `pairs`: an object keyed by pair id. For each pair give\n - `equivalent`: `true` or `false`.\n - `left_models`: the number of rows in which `left` is true, as an integer.\n - `right_models`: the number of rows in which `right` is true, as an integer.\n - `distinguishing`: for a pair that is not equivalent, one distinguishing valuation (an object giving `true` or `false` to exactly the atoms that occur in the pair). Any row in which the two formulas differ is accepted. For an equivalent pair give `null`.\n- `equivalent_ids`: list of the ids of the equivalent pairs (any order).\n- `cnf`: an object keyed by the ids in `convert.json`. Each value is a string: a formula in the syntax of the reference that is in conjunctive normal form, is equivalent to the given formula and uses no atom that the given formula does not contain. Any such formula of at most 2000 characters is accepted."} +{"id": "argument-check-validity-d2-e0023", "env": "argument-check", "isced_f": "0223", "family": "validity", "difficulty": 2, "split": "eval", "seed": 10023, "path": "tasks/argument-check/argument-check-validity-d2-e0023", "title": "Validity of 8 arguments", "checks": 29, "instruction": "# Argument check: validity\n\n`arguments.json` holds 8 arguments in propositional logic, each with its premises and a conclusion. `logic_reference.md` gives the formula syntax, including how to read formulas that are not fully parenthesised, and the definitions to apply.\n\nTest every argument with a full truth table over the atoms that occur in it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `arguments`: an object keyed by argument id. For each argument give\n - `valid`: `true` or `false`.\n - `premise_true_rows`: the number of rows in which every premise is true, as an integer.\n - `counterexample_rows`: the number of rows in which every premise is true and the conclusion is false, as an integer (0 for a valid argument).\n - `counterexample`: for an invalid argument, one counterexample written as a valuation (an object giving `true` or `false` to exactly the atoms that occur in the argument). Any counterexample is accepted. For a valid argument give `null`.\n- `valid_ids`: list of the ids of the valid arguments (any order)."} +{"id": "class-test-distractors-d1-t0000", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "split": "train", "seed": 0, "path": "tasks/class-test/class-test-distractors-d1-t0000", "title": "Distractor analysis of a 6-item test", "checks": 14, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d1-t0001", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "split": "train", "seed": 1, "path": "tasks/class-test/class-test-item-analysis-d1-t0001", "title": "Item analysis of a 8-item test", "checks": 18, "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 22 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d1-t0002", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "split": "train", "seed": 2, "path": "tasks/class-test/class-test-marking-d1-t0002", "title": "Mark a 20-item test for 6 students", "checks": 20, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d1-t0003", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "split": "train", "seed": 3, "path": "tasks/class-test/class-test-moderation-d1-t0003", "title": "Standardise the marks of a class test", "checks": 12, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d2-t0004", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "split": "train", "seed": 4, "path": "tasks/class-test/class-test-distractors-d2-t0004", "title": "Distractor analysis of a 8-item test", "checks": 34, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d2-t0005", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "split": "train", "seed": 5, "path": "tasks/class-test/class-test-item-analysis-d2-t0005", "title": "Item analysis of a 10-item test", "checks": 25, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d2-t0006", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "split": "train", "seed": 6, "path": "tasks/class-test/class-test-marking-d2-t0006", "title": "Mark a 24-item test for 9 students", "checks": 29, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d2-t0007", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "split": "train", "seed": 7, "path": "tasks/class-test/class-test-moderation-d2-t0007", "title": "Standardise the marks of a class test", "checks": 22, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d3-t0008", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "split": "train", "seed": 8, "path": "tasks/class-test/class-test-distractors-d3-t0008", "title": "Distractor analysis of a 7-item test", "checks": 38, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d3-t0009", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "split": "train", "seed": 9, "path": "tasks/class-test/class-test-item-analysis-d3-t0009", "title": "Item analysis of a 10-item test", "checks": 37, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d3-t0010", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "split": "train", "seed": 10, "path": "tasks/class-test/class-test-marking-d3-t0010", "title": "Mark a 30-item test for 10 students", "checks": 38, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d3-t0011", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "split": "train", "seed": 11, "path": "tasks/class-test/class-test-moderation-d3-t0011", "title": "Standardise the marks of a class test", "checks": 28, "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d1-t0012", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "split": "train", "seed": 12, "path": "tasks/class-test/class-test-distractors-d1-t0012", "title": "Distractor analysis of a 6-item test", "checks": 14, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d1-t0013", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "split": "train", "seed": 13, "path": "tasks/class-test/class-test-item-analysis-d1-t0013", "title": "Item analysis of a 8-item test", "checks": 18, "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 18 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d1-t0014", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "split": "train", "seed": 14, "path": "tasks/class-test/class-test-marking-d1-t0014", "title": "Mark a 20-item test for 6 students", "checks": 20, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d1-t0015", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "split": "train", "seed": 15, "path": "tasks/class-test/class-test-moderation-d1-t0015", "title": "Standardise the marks of a class test", "checks": 12, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d2-t0016", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "split": "train", "seed": 16, "path": "tasks/class-test/class-test-distractors-d2-t0016", "title": "Distractor analysis of a 8-item test", "checks": 34, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d2-t0017", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "split": "train", "seed": 17, "path": "tasks/class-test/class-test-item-analysis-d2-t0017", "title": "Item analysis of a 10-item test", "checks": 25, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d2-t0018", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "split": "train", "seed": 18, "path": "tasks/class-test/class-test-marking-d2-t0018", "title": "Mark a 24-item test for 9 students", "checks": 29, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d2-t0019", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "split": "train", "seed": 19, "path": "tasks/class-test/class-test-moderation-d2-t0019", "title": "Standardise the marks of a class test", "checks": 22, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d3-t0020", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "split": "train", "seed": 20, "path": "tasks/class-test/class-test-distractors-d3-t0020", "title": "Distractor analysis of a 7-item test", "checks": 38, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d3-t0021", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "split": "train", "seed": 21, "path": "tasks/class-test/class-test-item-analysis-d3-t0021", "title": "Item analysis of a 10-item test", "checks": 37, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d3-t0022", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "split": "train", "seed": 22, "path": "tasks/class-test/class-test-marking-d3-t0022", "title": "Mark a 30-item test for 10 students", "checks": 38, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d3-t0023", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "split": "train", "seed": 23, "path": "tasks/class-test/class-test-moderation-d3-t0023", "title": "Standardise the marks of a class test", "checks": 28, "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d1-t0024", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "split": "train", "seed": 24, "path": "tasks/class-test/class-test-distractors-d1-t0024", "title": "Distractor analysis of a 6-item test", "checks": 14, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d1-t0025", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "split": "train", "seed": 25, "path": "tasks/class-test/class-test-item-analysis-d1-t0025", "title": "Item analysis of a 8-item test", "checks": 18, "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 25 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d1-t0026", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "split": "train", "seed": 26, "path": "tasks/class-test/class-test-marking-d1-t0026", "title": "Mark a 20-item test for 6 students", "checks": 20, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d1-t0027", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "split": "train", "seed": 27, "path": "tasks/class-test/class-test-moderation-d1-t0027", "title": "Standardise the marks of a class test", "checks": 12, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d2-t0028", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "split": "train", "seed": 28, "path": "tasks/class-test/class-test-distractors-d2-t0028", "title": "Distractor analysis of a 8-item test", "checks": 34, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d2-t0029", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "split": "train", "seed": 29, "path": "tasks/class-test/class-test-item-analysis-d2-t0029", "title": "Item analysis of a 10-item test", "checks": 25, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d2-t0030", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "split": "train", "seed": 30, "path": "tasks/class-test/class-test-marking-d2-t0030", "title": "Mark a 24-item test for 9 students", "checks": 29, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d2-t0031", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "split": "train", "seed": 31, "path": "tasks/class-test/class-test-moderation-d2-t0031", "title": "Standardise the marks of a class test", "checks": 22, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d3-t0032", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "split": "train", "seed": 32, "path": "tasks/class-test/class-test-distractors-d3-t0032", "title": "Distractor analysis of a 7-item test", "checks": 38, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d3-t0033", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "split": "train", "seed": 33, "path": "tasks/class-test/class-test-item-analysis-d3-t0033", "title": "Item analysis of a 10-item test", "checks": 37, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d3-t0034", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "split": "train", "seed": 34, "path": "tasks/class-test/class-test-marking-d3-t0034", "title": "Mark a 30-item test for 10 students", "checks": 38, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d3-t0035", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "split": "train", "seed": 35, "path": "tasks/class-test/class-test-moderation-d3-t0035", "title": "Standardise the marks of a class test", "checks": 28, "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d1-t0036", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "split": "train", "seed": 36, "path": "tasks/class-test/class-test-distractors-d1-t0036", "title": "Distractor analysis of a 6-item test", "checks": 14, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d1-t0037", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "split": "train", "seed": 37, "path": "tasks/class-test/class-test-item-analysis-d1-t0037", "title": "Item analysis of a 8-item test", "checks": 18, "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 19 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d1-t0038", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "split": "train", "seed": 38, "path": "tasks/class-test/class-test-marking-d1-t0038", "title": "Mark a 20-item test for 6 students", "checks": 20, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d1-t0039", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "split": "train", "seed": 39, "path": "tasks/class-test/class-test-moderation-d1-t0039", "title": "Standardise the marks of a class test", "checks": 12, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d2-t0040", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "split": "train", "seed": 40, "path": "tasks/class-test/class-test-distractors-d2-t0040", "title": "Distractor analysis of a 8-item test", "checks": 34, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d2-t0041", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "split": "train", "seed": 41, "path": "tasks/class-test/class-test-item-analysis-d2-t0041", "title": "Item analysis of a 10-item test", "checks": 25, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d2-t0042", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "split": "train", "seed": 42, "path": "tasks/class-test/class-test-marking-d2-t0042", "title": "Mark a 24-item test for 9 students", "checks": 29, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d2-t0043", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "split": "train", "seed": 43, "path": "tasks/class-test/class-test-moderation-d2-t0043", "title": "Standardise the marks of a class test", "checks": 22, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d3-t0044", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "split": "train", "seed": 44, "path": "tasks/class-test/class-test-distractors-d3-t0044", "title": "Distractor analysis of a 7-item test", "checks": 38, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d3-t0045", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "split": "train", "seed": 45, "path": "tasks/class-test/class-test-item-analysis-d3-t0045", "title": "Item analysis of a 10-item test", "checks": 37, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d3-t0046", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "split": "train", "seed": 46, "path": "tasks/class-test/class-test-marking-d3-t0046", "title": "Mark a 30-item test for 10 students", "checks": 38, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d3-t0047", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "split": "train", "seed": 47, "path": "tasks/class-test/class-test-moderation-d3-t0047", "title": "Standardise the marks of a class test", "checks": 28, "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d1-t0048", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "split": "train", "seed": 48, "path": "tasks/class-test/class-test-distractors-d1-t0048", "title": "Distractor analysis of a 6-item test", "checks": 14, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d1-t0049", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "split": "train", "seed": 49, "path": "tasks/class-test/class-test-item-analysis-d1-t0049", "title": "Item analysis of a 8-item test", "checks": 18, "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 21 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d1-t0050", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "split": "train", "seed": 50, "path": "tasks/class-test/class-test-marking-d1-t0050", "title": "Mark a 20-item test for 6 students", "checks": 20, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d1-t0051", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "split": "train", "seed": 51, "path": "tasks/class-test/class-test-moderation-d1-t0051", "title": "Standardise the marks of a class test", "checks": 12, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d2-t0052", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "split": "train", "seed": 52, "path": "tasks/class-test/class-test-distractors-d2-t0052", "title": "Distractor analysis of a 8-item test", "checks": 34, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d2-t0053", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "split": "train", "seed": 53, "path": "tasks/class-test/class-test-item-analysis-d2-t0053", "title": "Item analysis of a 10-item test", "checks": 25, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d2-t0054", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "split": "train", "seed": 54, "path": "tasks/class-test/class-test-marking-d2-t0054", "title": "Mark a 24-item test for 9 students", "checks": 29, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d2-t0055", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "split": "train", "seed": 55, "path": "tasks/class-test/class-test-moderation-d2-t0055", "title": "Standardise the marks of a class test", "checks": 22, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d3-t0056", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "split": "train", "seed": 56, "path": "tasks/class-test/class-test-distractors-d3-t0056", "title": "Distractor analysis of a 7-item test", "checks": 38, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d3-t0057", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "split": "train", "seed": 57, "path": "tasks/class-test/class-test-item-analysis-d3-t0057", "title": "Item analysis of a 10-item test", "checks": 37, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d3-t0058", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "split": "train", "seed": 58, "path": "tasks/class-test/class-test-marking-d3-t0058", "title": "Mark a 30-item test for 10 students", "checks": 38, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d3-t0059", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "split": "train", "seed": 59, "path": "tasks/class-test/class-test-moderation-d3-t0059", "title": "Standardise the marks of a class test", "checks": 28, "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d1-t0060", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "split": "train", "seed": 60, "path": "tasks/class-test/class-test-distractors-d1-t0060", "title": "Distractor analysis of a 6-item test", "checks": 14, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d1-t0061", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "split": "train", "seed": 61, "path": "tasks/class-test/class-test-item-analysis-d1-t0061", "title": "Item analysis of a 8-item test", "checks": 18, "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 19 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d1-t0062", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "split": "train", "seed": 62, "path": "tasks/class-test/class-test-marking-d1-t0062", "title": "Mark a 20-item test for 6 students", "checks": 20, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d1-t0063", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "split": "train", "seed": 63, "path": "tasks/class-test/class-test-moderation-d1-t0063", "title": "Standardise the marks of a class test", "checks": 12, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d2-t0064", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "split": "train", "seed": 64, "path": "tasks/class-test/class-test-distractors-d2-t0064", "title": "Distractor analysis of a 8-item test", "checks": 34, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d2-t0065", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "split": "train", "seed": 65, "path": "tasks/class-test/class-test-item-analysis-d2-t0065", "title": "Item analysis of a 10-item test", "checks": 25, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d2-t0066", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "split": "train", "seed": 66, "path": "tasks/class-test/class-test-marking-d2-t0066", "title": "Mark a 24-item test for 9 students", "checks": 29, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d2-t0067", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "split": "train", "seed": 67, "path": "tasks/class-test/class-test-moderation-d2-t0067", "title": "Standardise the marks of a class test", "checks": 22, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d3-t0068", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "split": "train", "seed": 68, "path": "tasks/class-test/class-test-distractors-d3-t0068", "title": "Distractor analysis of a 7-item test", "checks": 38, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d3-t0069", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "split": "train", "seed": 69, "path": "tasks/class-test/class-test-item-analysis-d3-t0069", "title": "Item analysis of a 10-item test", "checks": 37, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d3-t0070", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "split": "train", "seed": 70, "path": "tasks/class-test/class-test-marking-d3-t0070", "title": "Mark a 30-item test for 10 students", "checks": 38, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d3-t0071", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "split": "train", "seed": 71, "path": "tasks/class-test/class-test-moderation-d3-t0071", "title": "Standardise the marks of a class test", "checks": 28, "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d1-t0072", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "split": "train", "seed": 72, "path": "tasks/class-test/class-test-distractors-d1-t0072", "title": "Distractor analysis of a 6-item test", "checks": 14, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d1-t0073", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "split": "train", "seed": 73, "path": "tasks/class-test/class-test-item-analysis-d1-t0073", "title": "Item analysis of a 8-item test", "checks": 18, "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 19 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d1-t0074", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "split": "train", "seed": 74, "path": "tasks/class-test/class-test-marking-d1-t0074", "title": "Mark a 20-item test for 6 students", "checks": 20, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d1-t0075", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "split": "train", "seed": 75, "path": "tasks/class-test/class-test-moderation-d1-t0075", "title": "Standardise the marks of a class test", "checks": 12, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d2-t0076", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "split": "train", "seed": 76, "path": "tasks/class-test/class-test-distractors-d2-t0076", "title": "Distractor analysis of a 8-item test", "checks": 34, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d2-t0077", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "split": "train", "seed": 77, "path": "tasks/class-test/class-test-item-analysis-d2-t0077", "title": "Item analysis of a 10-item test", "checks": 25, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d2-t0078", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "split": "train", "seed": 78, "path": "tasks/class-test/class-test-marking-d2-t0078", "title": "Mark a 24-item test for 9 students", "checks": 29, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d2-t0079", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "split": "train", "seed": 79, "path": "tasks/class-test/class-test-moderation-d2-t0079", "title": "Standardise the marks of a class test", "checks": 22, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d3-t0080", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "split": "train", "seed": 80, "path": "tasks/class-test/class-test-distractors-d3-t0080", "title": "Distractor analysis of a 7-item test", "checks": 38, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d3-t0081", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "split": "train", "seed": 81, "path": "tasks/class-test/class-test-item-analysis-d3-t0081", "title": "Item analysis of a 10-item test", "checks": 37, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d3-t0082", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "split": "train", "seed": 82, "path": "tasks/class-test/class-test-marking-d3-t0082", "title": "Mark a 30-item test for 10 students", "checks": 38, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d3-t0083", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "split": "train", "seed": 83, "path": "tasks/class-test/class-test-moderation-d3-t0083", "title": "Standardise the marks of a class test", "checks": 28, "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d1-e0000", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "split": "eval", "seed": 10000, "path": "tasks/class-test/class-test-distractors-d1-e0000", "title": "Distractor analysis of a 6-item test", "checks": 14, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d1-e0001", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "split": "eval", "seed": 10001, "path": "tasks/class-test/class-test-item-analysis-d1-e0001", "title": "Item analysis of a 8-item test", "checks": 18, "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 23 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d1-e0002", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "split": "eval", "seed": 10002, "path": "tasks/class-test/class-test-marking-d1-e0002", "title": "Mark a 20-item test for 6 students", "checks": 20, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d1-e0003", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "split": "eval", "seed": 10003, "path": "tasks/class-test/class-test-moderation-d1-e0003", "title": "Standardise the marks of a class test", "checks": 12, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d2-e0004", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "split": "eval", "seed": 10004, "path": "tasks/class-test/class-test-distractors-d2-e0004", "title": "Distractor analysis of a 8-item test", "checks": 34, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d2-e0005", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "split": "eval", "seed": 10005, "path": "tasks/class-test/class-test-item-analysis-d2-e0005", "title": "Item analysis of a 10-item test", "checks": 25, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d2-e0006", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "split": "eval", "seed": 10006, "path": "tasks/class-test/class-test-marking-d2-e0006", "title": "Mark a 24-item test for 9 students", "checks": 29, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d2-e0007", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "split": "eval", "seed": 10007, "path": "tasks/class-test/class-test-moderation-d2-e0007", "title": "Standardise the marks of a class test", "checks": 22, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d3-e0008", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "split": "eval", "seed": 10008, "path": "tasks/class-test/class-test-distractors-d3-e0008", "title": "Distractor analysis of a 7-item test", "checks": 38, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d3-e0009", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "split": "eval", "seed": 10009, "path": "tasks/class-test/class-test-item-analysis-d3-e0009", "title": "Item analysis of a 10-item test", "checks": 37, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d3-e0010", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "split": "eval", "seed": 10010, "path": "tasks/class-test/class-test-marking-d3-e0010", "title": "Mark a 30-item test for 10 students", "checks": 38, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d3-e0011", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "split": "eval", "seed": 10011, "path": "tasks/class-test/class-test-moderation-d3-e0011", "title": "Standardise the marks of a class test", "checks": 28, "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d1-e0012", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 1, "split": "eval", "seed": 10012, "path": "tasks/class-test/class-test-distractors-d1-e0012", "title": "Distractor analysis of a 6-item test", "checks": 14, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 6 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q6`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d1-e0013", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 1, "split": "eval", "seed": 10013, "path": "tasks/class-test/class-test-item-analysis-d1-e0013", "title": "Item analysis of a 8-item test", "checks": 18, "instruction": "# Class test: item analysis\n\n`scores.csv` holds the item scores (1 right, 0 wrong) of 22 students on a 8-item test. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d1-e0014", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 1, "split": "eval", "seed": 10014, "path": "tasks/class-test/class-test-marking-d1-e0014", "title": "Mark a 20-item test for 6 students", "checks": 20, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 6 students for a 20-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, an integer.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d1-e0015", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 1, "split": "eval", "seed": 10015, "path": "tasks/class-test/class-test-moderation-d1-e0015", "title": "Standardise the marks of a class test", "checks": 12, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of 10 students on a class test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `raw_mean`: the mean of the marks, 2 decimals.\n- `raw_sd`: the population standard deviation of the marks, 2 decimals.\n- `students`: an object keyed by student id, each with `scaled`: the rescaled mark, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d2-e0016", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 2, "split": "eval", "seed": 10016, "path": "tasks/class-test/class-test-distractors-d2-e0016", "title": "Distractor analysis of a 8-item test", "checks": 34, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 8 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q8`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D.\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d2-e0017", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 2, "split": "eval", "seed": 10017, "path": "tasks/class-test/class-test-item-analysis-d2-e0017", "title": "Item analysis of a 10-item test", "checks": 25, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d2-e0018", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 2, "split": "eval", "seed": 10018, "path": "tasks/class-test/class-test-marking-d2-e0018", "title": "Mark a 24-item test for 9 students", "checks": 29, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 9 students for a 24-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d2-e0019", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 2, "split": "eval", "seed": 10019, "path": "tasks/class-test/class-test-moderation-d2-e0019", "title": "Standardise the marks of a class test", "checks": 22, "instruction": "# Class test: standardising marks\n\n`marks.csv` holds the marks of two teaching groups on the same test. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `groups`: an object keyed by teaching group, each with `raw_mean` and `raw_sd` (population standard deviation) of that group's marks, 2 decimals.\n- `students`: an object keyed by student id, for every student with a mark, each with `scaled`: the rescaled mark after any limiting, 1 decimal.\n- `clamped`: list of the student ids whose scaled mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n- `absent`: list of the student ids with no mark (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-distractors-d3-e0020", "env": "class-test", "isced_f": "0111", "family": "distractors", "difficulty": 3, "split": "eval", "seed": 10020, "path": "tasks/class-test/class-test-distractors-d3-e0020", "title": "Distractor analysis of a 7-item test", "checks": 38, "instruction": "# Class test: distractor analysis\n\n`responses.csv` holds the option each student chose on each of the 7 items of a multiple-choice test (three classes, rows in no particular order). `key.csv` gives the correct option of each item. `distractor_notes.md` gives the definitions: follow them exactly. Analyse all classes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item (`Q1` to `Q7`). Each value has\n - `counts`: a list of integers, the count of each option in the order A, B, C, D (and E for a five-option item).\n - `non_functioning`: a list of the option letters of the item's non-functioning distractors (any order; an empty list if none).\n - `omitted`: the number of students who left the item out, an integer.\n - `key_pct`: the percentage of the `N` students who chose the key, 1 decimal.\n - `top_distractor`: the letter of the distractor chosen by the most students.\n- `has_non_functioning`: list of the items that have at least one non-functioning distractor (any order).\n- `key_beaten`: list of the items where at least one distractor beats the key (any order).\n- `n_students`: `N`, an integer.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-item-analysis-d3-e0021", "env": "class-test", "isced_f": "0111", "family": "item-analysis", "difficulty": 3, "split": "eval", "seed": 10021, "path": "tasks/class-test/class-test-item-analysis-d3-e0021", "title": "Item analysis of a 10-item test", "checks": 37, "instruction": "# Class test: item analysis\n\n`responses.csv` holds the options chosen by the students of two classes on a 10-item multiple-choice test, and `key.csv` the correct options. The rows are in no particular order. `item_analysis_notes.md` defines every statistic: follow it exactly. Analyse the two classes together as one group.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `n_group`: the size of the upper group (and of the lower group), an integer.\n- `items`: an object keyed by item (`Q1` to `Q10`). Each value has\n - `facility`: 3 decimals.\n - `discrimination`: the discrimination index, 3 decimals.\n - `point_biserial`: 3 decimals.\n- `poor_discrimination`: list of the items with poor discrimination (any order; an empty list if none).\n- `too_easy`: list of the items that are too easy (any order; an empty list if none).\n- `too_hard`: list of the items that are too hard (any order; an empty list if none).\n- `kr20`: the KR-20 reliability of the test, 3 decimals.\n- `n_students`: the number of students in the analysis, an integer.\n- `needs_review`: list of the items whose point-biserial is below 0.20 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-marking-d3-e0022", "env": "class-test", "isced_f": "0111", "family": "marking", "difficulty": 3, "split": "eval", "seed": 10022, "path": "tasks/class-test/class-test-marking-d3-e0022", "title": "Mark a 30-item test for 10 students", "checks": 38, "instruction": "# Class test: marking\n\n`answer_sheets.csv` holds the answer sheets of 10 students for a 30-item multiple-choice test. `answer_key.csv` gives the key and the marks for each item. `marking_scheme.md` gives the marking rules and the grade boundaries: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `max_marks`: the maximum total, an integer.\n- `students`: an object keyed by student id. Each value has\n - `marks`: the student's total, 2 decimals.\n - `percent`: the percentage, 1 decimal.\n - `grade`: one of `A`, `B`, `C`, `D`, `U`.\n- `grade_u`: list of the student ids with grade `U` (any order; an empty list if none).\n- `grade_counts`: an object with the keys `A`, `B`, `C`, `D`, `U`, each the number of students with that grade (0 if none).\n- `mean_percent`: the mean of the students' unrounded percentages, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "class-test-moderation-d3-e0023", "env": "class-test", "isced_f": "0111", "family": "moderation", "difficulty": 3, "split": "eval", "seed": 10023, "path": "tasks/class-test/class-test-moderation-d3-e0023", "title": "Standardise the marks of a class test", "checks": 28, "instruction": "# Class test: standardising marks\n\n`scripts.csv` holds the marks three markers gave to their scripts, and `moderation_sample.csv` the marks a moderator gave to a sample of those scripts. `moderation_notes.md` gives the procedure, the targets and the formula: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `markers`: an object keyed by marker, each with `mean_difference`: the mean of moderator's mark minus marker's mark over that marker's sampled scripts, 2 decimals, with its sign.\n- `adjusted_markers`: list of the markers whose marks were adjusted in step 1 (any order; an empty list if none).\n- `cohort_mean` and `cohort_sd`: the mean and population standard deviation of all students' marks after step 1, 2 decimals.\n- `students`: an object keyed by student id, each with `final`: the mark after step 2, including any limiting, 1 decimal.\n- `clamped`: list of the student ids whose final mark had to be limited to the top or bottom of the range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d1-t0000", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "split": "train", "seed": 0, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-t0000", "title": "Activity data to tonnes CO2e, 9 records", "checks": 9, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2020 greenhouse-gas inventory for Ostervik Bakery Group (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2020 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d1-t0001", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "split": "train", "seed": 1, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-t0001", "title": "Cleaning meter data for 3 meters", "checks": 9, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2022 monthly electricity consumption export for the meters of Brantholm Municipality (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d1-t0002", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "split": "train", "seed": 2, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-t0002", "title": "CO2, CH4 and N2O for 4 sources", "checks": 20, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Brantholm Municipality (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d1-t0003", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "split": "train", "seed": 3, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-t0003", "title": "Emissions trend over 5 years", "checks": 20, "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (tonnes of product). The rows are in no particular order. `target.md` gives the base year and the reduction target of Marrow Vale Housing (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2021 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d2-t0004", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "split": "train", "seed": 4, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-t0004", "title": "Activity data to tonnes CO2e, 25 records", "checks": 14, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2023 greenhouse-gas inventory for Lindqvist Castings (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2023 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d2-t0005", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "split": "train", "seed": 5, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-t0005", "title": "Cleaning meter data for 5 meters", "checks": 16, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2022 monthly electricity consumption export for the meters of Kestrel Joinery (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d2-t0006", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "split": "train", "seed": 6, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-t0006", "title": "CO2, CH4 and N2O for 6 sources", "checks": 28, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2023 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d2-t0007", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "split": "train", "seed": 7, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-t0007", "title": "Emissions trend over 6 years", "checks": 26, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (thousand parcels delivered). `target.md` gives the base year and the reduction target of Vessby Dairy Cooperative (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2022 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2022, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2022 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d3-t0008", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "split": "train", "seed": 8, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-t0008", "title": "Activity data to tonnes CO2e, 35 records", "checks": 22, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2019 greenhouse-gas inventory for Harlow Fold Logistics (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2019 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d3-t0009", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "split": "train", "seed": 9, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-t0009", "title": "Cleaning meter data for 6 meters", "checks": 23, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2023 monthly electricity consumption export for the meters of Tarnwick Borough Council (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d3-t0010", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "split": "train", "seed": 10, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-t0010", "title": "CO2, CH4 and N2O for 8 sources", "checks": 39, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2021 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d3-t0011", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "split": "train", "seed": 11, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-t0011", "title": "Emissions trend over 7 years", "checks": 31, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (tonnes of product); a year's output is the sum over sites. Site Birch was sold in 2021. Under the base-year recalculation policy in `target.md`, leave site Birch out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Kestrel Joinery (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2022 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2022, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2022 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2022 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d1-t0012", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "split": "train", "seed": 12, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-t0012", "title": "Activity data to tonnes CO2e, 9 records", "checks": 9, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2023 greenhouse-gas inventory for Ostervik Bakery Group (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2023 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d1-t0013", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "split": "train", "seed": 13, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-t0013", "title": "Cleaning meter data for 3 meters", "checks": 9, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2023 monthly electricity consumption export for the meters of Vessby Dairy Cooperative (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d1-t0014", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "split": "train", "seed": 14, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-t0014", "title": "CO2, CH4 and N2O for 4 sources", "checks": 20, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d1-t0015", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "split": "train", "seed": 15, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-t0015", "title": "Emissions trend over 5 years", "checks": 20, "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (thousand parcels delivered). The rows are in no particular order. `target.md` gives the base year and the reduction target of Lindqvist Castings (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2021 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d2-t0016", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "split": "train", "seed": 16, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-t0016", "title": "Activity data to tonnes CO2e, 22 records", "checks": 13, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2020 greenhouse-gas inventory for Harlow Fold Logistics (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2020 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d2-t0017", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "split": "train", "seed": 17, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-t0017", "title": "Cleaning meter data for 5 meters", "checks": 16, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2022 monthly electricity consumption export for the meters of Marrow Vale Housing (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d2-t0018", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "split": "train", "seed": 18, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-t0018", "title": "CO2, CH4 and N2O for 6 sources", "checks": 28, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2020 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d2-t0019", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "split": "train", "seed": 19, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-t0019", "title": "Emissions trend over 6 years", "checks": 26, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (m2 of heated floor area). `target.md` gives the base year and the reduction target of Marrow Vale Housing (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2022 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2022, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2022 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d3-t0020", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "split": "train", "seed": 20, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-t0020", "title": "Activity data to tonnes CO2e, 30 records", "checks": 20, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2019 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2019 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d3-t0021", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "split": "train", "seed": 21, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-t0021", "title": "Cleaning meter data for 6 meters", "checks": 24, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2023 monthly electricity consumption export for the meters of Brantholm Municipality (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d3-t0022", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "split": "train", "seed": 22, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-t0022", "title": "CO2, CH4 and N2O for 8 sources", "checks": 39, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2020 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d3-t0023", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "split": "train", "seed": 23, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-t0023", "title": "Emissions trend over 7 years", "checks": 31, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (m2 of heated floor area); a year's output is the sum over sites. Site Alder was sold in 2022. Under the base-year recalculation policy in `target.md`, leave site Alder out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Vessby Dairy Cooperative (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2023 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2023, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2023 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2023 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d1-t0024", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "split": "train", "seed": 24, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-t0024", "title": "Activity data to tonnes CO2e, 10 records", "checks": 9, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2024 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2024 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d1-t0025", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "split": "train", "seed": 25, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-t0025", "title": "Cleaning meter data for 3 meters", "checks": 9, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2023 monthly electricity consumption export for the meters of Marrow Vale Housing (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d1-t0026", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "split": "train", "seed": 26, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-t0026", "title": "CO2, CH4 and N2O for 4 sources", "checks": 20, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Lindqvist Castings (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d1-t0027", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "split": "train", "seed": 27, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-t0027", "title": "Emissions trend over 5 years", "checks": 20, "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (m2 of heated floor area). The rows are in no particular order. `target.md` gives the base year and the reduction target of Marrow Vale Housing (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2020 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d2-t0028", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "split": "train", "seed": 28, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-t0028", "title": "Activity data to tonnes CO2e, 25 records", "checks": 14, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2023 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2023 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d2-t0029", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "split": "train", "seed": 29, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-t0029", "title": "Cleaning meter data for 5 meters", "checks": 16, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2023 monthly electricity consumption export for the meters of Brantholm Municipality (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d2-t0030", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "split": "train", "seed": 30, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-t0030", "title": "CO2, CH4 and N2O for 6 sources", "checks": 28, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2021 greenhouse-gas inventory for Marrow Vale Housing (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d2-t0031", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "split": "train", "seed": 31, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-t0031", "title": "Emissions trend over 6 years", "checks": 26, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (m2 of heated floor area). `target.md` gives the base year and the reduction target of Harlow Fold Logistics (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2022 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2022, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2022 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d3-t0032", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "split": "train", "seed": 32, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-t0032", "title": "Activity data to tonnes CO2e, 33 records", "checks": 22, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2024 greenhouse-gas inventory for Brantholm Municipality (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2024 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d3-t0033", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "split": "train", "seed": 33, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-t0033", "title": "Cleaning meter data for 6 meters", "checks": 24, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2022 monthly electricity consumption export for the meters of Harlow Fold Logistics (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d3-t0034", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "split": "train", "seed": 34, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-t0034", "title": "CO2, CH4 and N2O for 8 sources", "checks": 39, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Harlow Fold Logistics (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d3-t0035", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "split": "train", "seed": 35, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-t0035", "title": "Emissions trend over 7 years", "checks": 31, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (tonnes of product); a year's output is the sum over sites. Site Cedar was sold in 2020. Under the base-year recalculation policy in `target.md`, leave site Cedar out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Vessby Dairy Cooperative (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2015\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2015.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2015.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2021 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2021, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2021 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2021 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d1-t0036", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "split": "train", "seed": 36, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-t0036", "title": "Activity data to tonnes CO2e, 13 records", "checks": 9, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2024 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2024 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d1-t0037", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "split": "train", "seed": 37, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-t0037", "title": "Cleaning meter data for 3 meters", "checks": 9, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2021 monthly electricity consumption export for the meters of Kestrel Joinery (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d1-t0038", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "split": "train", "seed": 38, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-t0038", "title": "CO2, CH4 and N2O for 4 sources", "checks": 20, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2022 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d1-t0039", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "split": "train", "seed": 39, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-t0039", "title": "Emissions trend over 5 years", "checks": 20, "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (tonnes of product). The rows are in no particular order. `target.md` gives the base year and the reduction target of Brantholm Municipality (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2020 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d2-t0040", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "split": "train", "seed": 40, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-t0040", "title": "Activity data to tonnes CO2e, 23 records", "checks": 13, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2021 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2021 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d2-t0041", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "split": "train", "seed": 41, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-t0041", "title": "Cleaning meter data for 5 meters", "checks": 16, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2022 monthly electricity consumption export for the meters of Kestrel Joinery (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d2-t0042", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "split": "train", "seed": 42, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-t0042", "title": "CO2, CH4 and N2O for 6 sources", "checks": 28, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2020 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d2-t0043", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "split": "train", "seed": 43, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-t0043", "title": "Emissions trend over 6 years", "checks": 26, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (tonnes of product). `target.md` gives the base year and the reduction target of Tarnwick Borough Council (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2014\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2014.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2014.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2019 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2019, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2019 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d3-t0044", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "split": "train", "seed": 44, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-t0044", "title": "Activity data to tonnes CO2e, 31 records", "checks": 21, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2021 greenhouse-gas inventory for Brantholm Municipality (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2021 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d3-t0045", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "split": "train", "seed": 45, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-t0045", "title": "Cleaning meter data for 6 meters", "checks": 25, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2024 monthly electricity consumption export for the meters of Harlow Fold Logistics (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d3-t0046", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "split": "train", "seed": 46, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-t0046", "title": "CO2, CH4 and N2O for 8 sources", "checks": 39, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2019 greenhouse-gas inventory for Lindqvist Castings (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d3-t0047", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "split": "train", "seed": 47, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-t0047", "title": "Emissions trend over 7 years", "checks": 31, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (m2 of heated floor area); a year's output is the sum over sites. Site Dunlin was sold in 2022. Under the base-year recalculation policy in `target.md`, leave site Dunlin out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Tarnwick Borough Council (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2023 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2023, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2023 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2023 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d1-t0048", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "split": "train", "seed": 48, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-t0048", "title": "Activity data to tonnes CO2e, 11 records", "checks": 9, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2019 greenhouse-gas inventory for Marrow Vale Housing (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2019 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d1-t0049", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "split": "train", "seed": 49, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-t0049", "title": "Cleaning meter data for 3 meters", "checks": 9, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2023 monthly electricity consumption export for the meters of Tarnwick Borough Council (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d1-t0050", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "split": "train", "seed": 50, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-t0050", "title": "CO2, CH4 and N2O for 4 sources", "checks": 20, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2022 greenhouse-gas inventory for Lindqvist Castings (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d1-t0051", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "split": "train", "seed": 51, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-t0051", "title": "Emissions trend over 5 years", "checks": 20, "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (residents). The rows are in no particular order. `target.md` gives the base year and the reduction target of Marrow Vale Housing (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2020 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d2-t0052", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "split": "train", "seed": 52, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-t0052", "title": "Activity data to tonnes CO2e, 22 records", "checks": 13, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2023 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2023 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d2-t0053", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "split": "train", "seed": 53, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-t0053", "title": "Cleaning meter data for 5 meters", "checks": 16, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2021 monthly electricity consumption export for the meters of Vessby Dairy Cooperative (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d2-t0054", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "split": "train", "seed": 54, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-t0054", "title": "CO2, CH4 and N2O for 6 sources", "checks": 28, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2022 greenhouse-gas inventory for Lindqvist Castings (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d2-t0055", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "split": "train", "seed": 55, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-t0055", "title": "Emissions trend over 6 years", "checks": 26, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (thousand parcels delivered). `target.md` gives the base year and the reduction target of Vessby Dairy Cooperative (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2018\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2023 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2023, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2023 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d3-t0056", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "split": "train", "seed": 56, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-t0056", "title": "Activity data to tonnes CO2e, 32 records", "checks": 22, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2019 greenhouse-gas inventory for Ostervik Bakery Group (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2019 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d3-t0057", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "split": "train", "seed": 57, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-t0057", "title": "Cleaning meter data for 6 meters", "checks": 25, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2021 monthly electricity consumption export for the meters of Brantholm Municipality (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d3-t0058", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "split": "train", "seed": 58, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-t0058", "title": "CO2, CH4 and N2O for 8 sources", "checks": 39, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Brantholm Municipality (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d3-t0059", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "split": "train", "seed": 59, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-t0059", "title": "Emissions trend over 7 years", "checks": 31, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (thousand parcels delivered); a year's output is the sum over sites. Site Birch was sold in 2023. Under the base-year recalculation policy in `target.md`, leave site Birch out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Harlow Fold Logistics (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2018\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2024 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2024, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2024 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2024 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d1-t0060", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "split": "train", "seed": 60, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-t0060", "title": "Activity data to tonnes CO2e, 11 records", "checks": 9, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2020 greenhouse-gas inventory for Harlow Fold Logistics (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2020 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d1-t0061", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "split": "train", "seed": 61, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-t0061", "title": "Cleaning meter data for 3 meters", "checks": 9, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2021 monthly electricity consumption export for the meters of Kestrel Joinery (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d1-t0062", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "split": "train", "seed": 62, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-t0062", "title": "CO2, CH4 and N2O for 4 sources", "checks": 20, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2022 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d1-t0063", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "split": "train", "seed": 63, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-t0063", "title": "Emissions trend over 5 years", "checks": 20, "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (m2 of heated floor area). The rows are in no particular order. `target.md` gives the base year and the reduction target of Marrow Vale Housing (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2020 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d2-t0064", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "split": "train", "seed": 64, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-t0064", "title": "Activity data to tonnes CO2e, 24 records", "checks": 13, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2020 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2020 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d2-t0065", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "split": "train", "seed": 65, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-t0065", "title": "Cleaning meter data for 5 meters", "checks": 16, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2024 monthly electricity consumption export for the meters of Marrow Vale Housing (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d2-t0066", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "split": "train", "seed": 66, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-t0066", "title": "CO2, CH4 and N2O for 6 sources", "checks": 28, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Ostervik Bakery Group (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d2-t0067", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "split": "train", "seed": 67, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-t0067", "title": "Emissions trend over 6 years", "checks": 26, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (tonnes of product). `target.md` gives the base year and the reduction target of Kestrel Joinery (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2021 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2021, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2021 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d3-t0068", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "split": "train", "seed": 68, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-t0068", "title": "Activity data to tonnes CO2e, 32 records", "checks": 20, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2019 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2019 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d3-t0069", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "split": "train", "seed": 69, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-t0069", "title": "Cleaning meter data for 6 meters", "checks": 25, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2020 monthly electricity consumption export for the meters of Harlow Fold Logistics (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d3-t0070", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "split": "train", "seed": 70, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-t0070", "title": "CO2, CH4 and N2O for 8 sources", "checks": 39, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d3-t0071", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "split": "train", "seed": 71, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-t0071", "title": "Emissions trend over 7 years", "checks": 31, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (m2 of heated floor area); a year's output is the sum over sites. Site Dunlin was sold in 2021. Under the base-year recalculation policy in `target.md`, leave site Dunlin out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Vessby Dairy Cooperative (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2022 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2022, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2022 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2022 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d1-t0072", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "split": "train", "seed": 72, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-t0072", "title": "Activity data to tonnes CO2e, 10 records", "checks": 9, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2019 greenhouse-gas inventory for Ostervik Bakery Group (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2019 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d1-t0073", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "split": "train", "seed": 73, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-t0073", "title": "Cleaning meter data for 3 meters", "checks": 9, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2021 monthly electricity consumption export for the meters of Harlow Fold Logistics (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d1-t0074", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "split": "train", "seed": 74, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-t0074", "title": "CO2, CH4 and N2O for 4 sources", "checks": 20, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d1-t0075", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "split": "train", "seed": 75, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-t0075", "title": "Emissions trend over 5 years", "checks": 20, "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (residents). The rows are in no particular order. `target.md` gives the base year and the reduction target of Ostervik Bakery Group (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2020 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d2-t0076", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "split": "train", "seed": 76, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-t0076", "title": "Activity data to tonnes CO2e, 26 records", "checks": 13, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2024 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2024 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d2-t0077", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "split": "train", "seed": 77, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-t0077", "title": "Cleaning meter data for 5 meters", "checks": 16, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2023 monthly electricity consumption export for the meters of Ostervik Bakery Group (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d2-t0078", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "split": "train", "seed": 78, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-t0078", "title": "CO2, CH4 and N2O for 6 sources", "checks": 28, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2019 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d2-t0079", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "split": "train", "seed": 79, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-t0079", "title": "Emissions trend over 6 years", "checks": 26, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (residents). `target.md` gives the base year and the reduction target of Brantholm Municipality (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2021 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2021, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2021 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d3-t0080", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "split": "train", "seed": 80, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-t0080", "title": "Activity data to tonnes CO2e, 33 records", "checks": 22, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2022 greenhouse-gas inventory for Vessby Dairy Cooperative (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2022 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d3-t0081", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "split": "train", "seed": 81, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-t0081", "title": "Cleaning meter data for 6 meters", "checks": 24, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2020 monthly electricity consumption export for the meters of Tarnwick Borough Council (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d3-t0082", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "split": "train", "seed": 82, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-t0082", "title": "CO2, CH4 and N2O for 8 sources", "checks": 39, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2019 greenhouse-gas inventory for Harlow Fold Logistics (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d3-t0083", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "split": "train", "seed": 83, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-t0083", "title": "Emissions trend over 7 years", "checks": 31, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (thousand parcels delivered); a year's output is the sum over sites. Site Elm was sold in 2020. Under the base-year recalculation policy in `target.md`, leave site Elm out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Brantholm Municipality (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2015\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2015.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2015.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2021 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2021, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2021 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2021 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d1-e0000", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "split": "eval", "seed": 10000, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-e0000", "title": "Activity data to tonnes CO2e, 9 records", "checks": 9, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2019 greenhouse-gas inventory for Lindqvist Castings (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2019 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d1-e0001", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "split": "eval", "seed": 10001, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-e0001", "title": "Cleaning meter data for 3 meters", "checks": 9, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2019 monthly electricity consumption export for the meters of Ostervik Bakery Group (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d1-e0002", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "split": "eval", "seed": 10002, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-e0002", "title": "CO2, CH4 and N2O for 4 sources", "checks": 20, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2019 greenhouse-gas inventory for Tarnwick Borough Council (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d1-e0003", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "split": "eval", "seed": 10003, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-e0003", "title": "Emissions trend over 5 years", "checks": 20, "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (tonnes of product). The rows are in no particular order. `target.md` gives the base year and the reduction target of Ostervik Bakery Group (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2017\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2017.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2021 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d2-e0004", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "split": "eval", "seed": 10004, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-e0004", "title": "Activity data to tonnes CO2e, 28 records", "checks": 14, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2021 greenhouse-gas inventory for Marrow Vale Housing (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2021 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d2-e0005", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "split": "eval", "seed": 10005, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-e0005", "title": "Cleaning meter data for 5 meters", "checks": 16, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2021 monthly electricity consumption export for the meters of Lindqvist Castings (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d2-e0006", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "split": "eval", "seed": 10006, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-e0006", "title": "CO2, CH4 and N2O for 6 sources", "checks": 28, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2019 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d2-e0007", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "split": "eval", "seed": 10007, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-e0007", "title": "Emissions trend over 6 years", "checks": 26, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (m2 of heated floor area). `target.md` gives the base year and the reduction target of Ostervik Bakery Group (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2018\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2023 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2023, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2023 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d3-e0008", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "split": "eval", "seed": 10008, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-e0008", "title": "Activity data to tonnes CO2e, 31 records", "checks": 21, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2024 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2024 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d3-e0009", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "split": "eval", "seed": 10009, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-e0009", "title": "Cleaning meter data for 6 meters", "checks": 23, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2020 monthly electricity consumption export for the meters of Lindqvist Castings (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d3-e0010", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "split": "eval", "seed": 10010, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-e0010", "title": "CO2, CH4 and N2O for 8 sources", "checks": 39, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2023 greenhouse-gas inventory for Brantholm Municipality (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d3-e0011", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "split": "eval", "seed": 10011, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-e0011", "title": "Emissions trend over 7 years", "checks": 31, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (thousand parcels delivered); a year's output is the sum over sites. Site Cedar was sold in 2021. Under the base-year recalculation policy in `target.md`, leave site Cedar out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Lindqvist Castings (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2016\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2016.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2022 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2022, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2022 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2022 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d1-e0012", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 1, "split": "eval", "seed": 10012, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d1-e0012", "title": "Activity data to tonnes CO2e, 14 records", "checks": 9, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2020 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nEvery record belongs to the 2020 reporting year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d1-e0013", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 1, "split": "eval", "seed": 10013, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d1-e0013", "title": "Cleaning meter data for 3 meters", "checks": 9, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2019 monthly electricity consumption export for the meters of Kestrel Joinery (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d1-e0014", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 1, "split": "eval", "seed": 10014, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d1-e0014", "title": "CO2, CH4 and N2O for 4 sources", "checks": 20, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2024 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nEvery amount is already in the unit of its category's factors.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d1-e0015", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 1, "split": "eval", "seed": 10015, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d1-e0015", "title": "Emissions trend over 5 years", "checks": 20, "instruction": "# Emissions inventory: trend and target\n\n`annual_emissions.csv` gives the emissions of each year by scope in tonnes CO2e and the year's output (tonnes of product). The rows are in no particular order. `target.md` gives the base year and the reduction target of Ostervik Bakery Group (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2018\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2022 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d2-e0016", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 2, "split": "eval", "seed": 10016, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d2-e0016", "title": "Activity data to tonnes CO2e, 26 records", "checks": 14, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2020 greenhouse-gas inventory for Harlow Fold Logistics (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2020 only: leave out records whose `invoice_date` falls in another year.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d2-e0017", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 2, "split": "eval", "seed": 10017, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d2-e0017", "title": "Cleaning meter data for 5 meters", "checks": 16, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2021 monthly electricity consumption export for the meters of Marrow Vale Housing (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d2-e0018", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 2, "split": "eval", "seed": 10018, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d2-e0018", "title": "CO2, CH4 and N2O for 6 sources", "checks": 28, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2019 greenhouse-gas inventory for Lindqvist Castings (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together as tonnes CO2e), each 2 decimals.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d2-e0019", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 2, "split": "eval", "seed": 10019, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d2-e0019", "title": "Emissions trend over 6 years", "checks": 26, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each year's output (residents). `target.md` gives the base year and the reduction target of Marrow Vale Housing (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2015\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2015.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2015.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2020 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2020, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2020 total is at or below `linear_path_latest_t`, otherwise false.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-activity-data-d3-e0020", "env": "emissions-inventory", "isced_f": "0521", "family": "activity-data", "difficulty": 3, "split": "eval", "seed": 10020, "path": "tasks/emissions-inventory/emissions-inventory-activity-data-d3-e0020", "title": "Activity data to tonnes CO2e, 30 records", "checks": 22, "instruction": "# Emissions inventory: activity data\n\nYou are compiling the 2023 greenhouse-gas inventory for Brantholm Municipality (a synthetic organisation).\n\n- `activity_data.csv`: the activity records (fuel, energy, travel and waste), in whatever unit the supplier used.\n- `emission_factors.csv`: for each source, the emission factor in kg CO2e per unit, the unit it applies to, and the scope the source belongs to. Use these factors and this classification.\n- `inventory_boundary.md`: the organisation and the reporting year.\n- `unit_conversions.csv`: multiply a quantity in `from_unit` by `multiply_by` to get `to_unit`. A row applies to every source if `applies_to` is `all`, otherwise only to the sources listed there (separated by semicolons). Use these values.\n\nThe inventory covers the calendar year 2023 only: leave out records whose `invoice_date` falls in another year. Sources classed `outside scopes` in the factor table (biogenic CO2) are reported separately: work out their emissions and list them in `by_source`, but keep them out of `by_scope`, `by_site`, `total_t_co2e`, `scope_share_percent` and `largest_source`.\n\nFor each record, convert the quantity to the unit of its source's emission factor if it is not already in that unit, multiply by the factor, and convert kg to tonnes (1 tonne = 1000 kg).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `by_source`: an object keyed by source, tonnes CO2e, 2 decimals. Include only sources that have records in the reporting year.\n- `by_scope`: an object with keys `scope_1`, `scope_2` and `scope_3`, tonnes CO2e, 2 decimals.\n- `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 2 decimals.\n- `by_site`: an object keyed by site, tonnes CO2e of scopes 1 to 3 together, 2 decimals.\n- `outside_scopes_t_co2e`: tonnes CO2e of the sources classed `outside scopes`, 2 decimals.\n- `scope_share_percent`: an object with keys `scope_1`, `scope_2` and `scope_3`: each scope's share of `total_t_co2e` in percent, 1 decimal.\n- `largest_source`: the source in scopes 1 to 3 with the largest emissions.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-data-quality-d3-e0021", "env": "emissions-inventory", "isced_f": "0521", "family": "data-quality", "difficulty": 3, "split": "eval", "seed": 10021, "path": "tasks/emissions-inventory/emissions-inventory-data-quality-d3-e0021", "title": "Cleaning meter data for 6 meters", "checks": 24, "instruction": "# Emissions inventory: cleaning the meter data\n\n`meter_readings.csv` is the 2022 monthly electricity consumption export for the meters of Brantholm Municipality (a synthetic organisation). It was assembled from several uploads and needs cleaning before it can be used. `data_rules.md` gives the cleaning rules and the emission factor.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `meters`: an object keyed by meter id, each with\n - `annual_kwh`: the meter's consumption for the twelve months after cleaning, in kWh, 1 decimal.\n - `duplicate_rows`: how many of its rows you dropped as duplicates, as an integer (0 if none).\n- `duplicate_rows_removed`: the number of duplicate rows dropped over all meters, as an integer.\n- `total_kwh`: cleaned consumption of all meters, in kWh, 1 decimal.\n- `total_t_co2e`: emissions from `total_kwh`, in tonnes CO2e, 2 decimals.\n- `filled`: an object keyed by meter id, only for meters that had a missing month. Each value is an object keyed by the missing month (`YYYY-MM`) giving the filled consumption in kWh, 1 decimal.\n- `meters_with_gap`: list of the meter ids that had at least one missing month (any order).\n- `by_site_t_co2e`: an object keyed by site, tonnes CO2e from the cleaned consumption of that site's meters, 2 decimals.\n- `peak_month`: the month (`YYYY-MM`) with the highest cleaned consumption summed over all meters.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-multi-gas-d3-e0022", "env": "emissions-inventory", "isced_f": "0521", "family": "multi-gas", "difficulty": 3, "split": "eval", "seed": 10022, "path": "tasks/emissions-inventory/emissions-inventory-multi-gas-d3-e0022", "title": "CO2, CH4 and N2O for 8 sources", "checks": 39, "instruction": "# Emissions inventory: three gases\n\nYou are compiling the 2020 greenhouse-gas inventory for Kestrel Joinery (a synthetic organisation), gas by gas.\n\n- `sources.csv`: the emission sources and their activity amounts.\n- `gas_factors.csv`: for each category, the emissions per unit of activity: CO2 in kg, CH4 in grams and N2O in grams.\n- `gwp_values.md`: the global warming potentials to use.\n\nSome amounts are in a different unit from their category's factors: convert first, using 1 m3 = 1000 litres and 1 tonne = 1000 kg. `refrigerant_log.csv` lists the cooling units serviced in the year: take the refrigerant topped up (`topped_up_kg`) as the amount that leaked, and convert it to CO2e with the GWP of that refrigerant. The charge is for information only.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sources`: an object keyed by `source_id`, each with\n - `co2_t`: CO2 emitted, in tonnes, 2 decimals.\n - `ch4_kg`: CH4 emitted, in kg, 2 decimals.\n - `n2o_kg`: N2O emitted, in kg, 2 decimals.\n - `co2e_t`: the three gases together in tonnes CO2e, 2 decimals.\n- `totals`: an object with `co2_t` (all CO2, tonnes), `ch4_t_co2e` (all CH4 as tonnes CO2e), `n2o_t_co2e` (all N2O as tonnes CO2e) and `co2e_t` (everything together, including the refrigerant leaks, as tonnes CO2e), each 2 decimals.\n- `refrigerants_t_co2e`: the refrigerant leaks in tonnes CO2e, 3 decimals.\n- `non_co2_share_percent`: the share of `totals.co2e_t` that does not come from CO2 (CH4, N2O and refrigerants), in percent, 1 decimal.\n- `largest_source`: the `source_id` in `sources.csv` with the largest CO2e.\n\n1 tonne = 1000 kg = 1 000 000 g. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "emissions-inventory-time-series-d3-e0023", "env": "emissions-inventory", "isced_f": "0521", "family": "time-series", "difficulty": 3, "split": "eval", "seed": 10023, "path": "tasks/emissions-inventory/emissions-inventory-time-series-d3-e0023", "title": "Emissions trend over 7 years", "checks": 31, "instruction": "# Emissions inventory: trend and target\n\n`emissions_ledger.csv` holds one row per year, site and scope. The `amount` is in tonnes CO2e when `unit` is `t` and in kg CO2e when it is `kg` (1 tonne = 1000 kg). A year's total is the sum over all sites and scopes. `output.csv` gives each site's output per year (m2 of heated floor area); a year's output is the sum over sites. Site Birch was sold in 2023. Under the base-year recalculation policy in `target.md`, leave site Birch out of every year, in both emissions and output. `target.md` gives the base year and the reduction target of Vessby Dairy Cooperative (a synthetic organisation).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: an object keyed by year (as a string, for example \"2018\"), each with\n - `total_t_co2e`: scopes 1 to 3 together, tonnes CO2e, 1 decimal.\n - `intensity_kg_per_unit`: kg CO2e per unit of output (total x 1000 / output), 1 decimal.\n - `change_vs_previous_percent`: change in the total against the year before, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n - `change_vs_base_percent`: change in the total against the base year, in percent, 1 decimal (negative for a fall). Leave it out for 2018.\n- `target_t_co2e`: the total allowed in the target year, tonnes CO2e, 1 decimal.\n- `required_annual_reduction_t`: the equal cut in tonnes CO2e per year that takes the 2024 total to the target by the target year: (latest total - target) / years left, 1 decimal.\n- `linear_path_latest_t`: where a straight line from the base-year total (in the base year) to the target (in the target year) stands in 2024, tonnes CO2e, 1 decimal.\n- `on_track`: true if the 2024 total is at or below `linear_path_latest_t`, otherwise false.\n- `required_annual_reduction_percent`: the constant percentage cut per year that takes the 2024 total to the target by the target year, 2 decimals: (1 - (target / latest total)^(1 / years left)) x 100.\n\nA percentage change is (new - old) / old x 100. Do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d1-t0000", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "split": "train", "seed": 0, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-t0000", "title": "Airborne exposure for 3 workers", "checks": 7, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d1-t0001", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "split": "train", "seed": 1, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-t0001", "title": "Injury rates for 2024", "checks": 6, "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2024 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 2 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d1-t0002", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "split": "train", "seed": 2, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-t0002", "title": "Noise exposure for 3 workers", "checks": 7, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d1-t0003", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "split": "train", "seed": 3, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-t0003", "title": "Hand-arm vibration for 4 operators", "checks": 9, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d2-t0004", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "split": "train", "seed": 4, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-t0004", "title": "Airborne exposure for 5 workers", "checks": 16, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d2-t0005", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "split": "train", "seed": 5, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-t0005", "title": "Injury rates for 2023", "checks": 22, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2023 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d2-t0006", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "split": "train", "seed": 6, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-t0006", "title": "Noise exposure for 5 workers", "checks": 16, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d2-t0007", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "split": "train", "seed": 7, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-t0007", "title": "Hand-arm vibration for 5 operators", "checks": 18, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d3-t0008", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "split": "train", "seed": 8, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-t0008", "title": "Airborne exposure for 4 workers", "checks": 27, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d3-t0009", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "split": "train", "seed": 9, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-t0009", "title": "Injury rates for 2024", "checks": 29, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2023 and 2024 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2024, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (3 decimals), all for 2024.\n- `site`: an object keyed by year (`\"2023\"` and `\"2024\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2024 minus the site LTIFR for 2023, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2024 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2024 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d3-t0010", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "split": "train", "seed": 10, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-t0010", "title": "Noise exposure for 4 workers", "checks": 32, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d3-t0011", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "split": "train", "seed": 11, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-t0011", "title": "Hand-arm vibration for 5 operators", "checks": 30, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d1-t0012", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "split": "train", "seed": 12, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-t0012", "title": "Airborne exposure for 3 workers", "checks": 7, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d1-t0013", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "split": "train", "seed": 13, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-t0013", "title": "Injury rates for 2022", "checks": 6, "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2022 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 2 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d1-t0014", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "split": "train", "seed": 14, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-t0014", "title": "Noise exposure for 3 workers", "checks": 7, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d1-t0015", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "split": "train", "seed": 15, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-t0015", "title": "Hand-arm vibration for 4 operators", "checks": 9, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d2-t0016", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "split": "train", "seed": 16, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-t0016", "title": "Airborne exposure for 5 workers", "checks": 16, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d2-t0017", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "split": "train", "seed": 17, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-t0017", "title": "Injury rates for 2024", "checks": 22, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2024 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d2-t0018", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "split": "train", "seed": 18, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-t0018", "title": "Noise exposure for 5 workers", "checks": 16, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d2-t0019", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "split": "train", "seed": 19, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-t0019", "title": "Hand-arm vibration for 5 operators", "checks": 18, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d3-t0020", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "split": "train", "seed": 20, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-t0020", "title": "Airborne exposure for 4 workers", "checks": 27, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d3-t0021", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "split": "train", "seed": 21, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-t0021", "title": "Injury rates for 2021", "checks": 29, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2020 and 2021 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2021, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals), all for 2021.\n- `site`: an object keyed by year (`\"2020\"` and `\"2021\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2021 minus the site LTIFR for 2020, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2021 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2021 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d3-t0022", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "split": "train", "seed": 22, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-t0022", "title": "Noise exposure for 4 workers", "checks": 30, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d3-t0023", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "split": "train", "seed": 23, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-t0023", "title": "Hand-arm vibration for 5 operators", "checks": 30, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d1-t0024", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "split": "train", "seed": 24, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-t0024", "title": "Airborne exposure for 3 workers", "checks": 7, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d1-t0025", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "split": "train", "seed": 25, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-t0025", "title": "Injury rates for 2022", "checks": 6, "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2022 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 3 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d1-t0026", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "split": "train", "seed": 26, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-t0026", "title": "Noise exposure for 3 workers", "checks": 7, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d1-t0027", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "split": "train", "seed": 27, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-t0027", "title": "Hand-arm vibration for 4 operators", "checks": 9, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d2-t0028", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "split": "train", "seed": 28, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-t0028", "title": "Airborne exposure for 5 workers", "checks": 16, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d2-t0029", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "split": "train", "seed": 29, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-t0029", "title": "Injury rates for 2023", "checks": 22, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2023 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (3 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d2-t0030", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "split": "train", "seed": 30, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-t0030", "title": "Noise exposure for 5 workers", "checks": 16, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d2-t0031", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "split": "train", "seed": 31, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-t0031", "title": "Hand-arm vibration for 5 operators", "checks": 18, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d3-t0032", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "split": "train", "seed": 32, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-t0032", "title": "Airborne exposure for 4 workers", "checks": 27, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d3-t0033", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "split": "train", "seed": 33, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-t0033", "title": "Injury rates for 2023", "checks": 29, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2022 and 2023 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2023, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals), all for 2023.\n- `site`: an object keyed by year (`\"2022\"` and `\"2023\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2023 minus the site LTIFR for 2022, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2023 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2023 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d3-t0034", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "split": "train", "seed": 34, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-t0034", "title": "Noise exposure for 4 workers", "checks": 28, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d3-t0035", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "split": "train", "seed": 35, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-t0035", "title": "Hand-arm vibration for 5 operators", "checks": 30, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d1-t0036", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "split": "train", "seed": 36, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-t0036", "title": "Airborne exposure for 3 workers", "checks": 7, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d1-t0037", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "split": "train", "seed": 37, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-t0037", "title": "Injury rates for 2022", "checks": 6, "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2022 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 2 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d1-t0038", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "split": "train", "seed": 38, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-t0038", "title": "Noise exposure for 3 workers", "checks": 7, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d1-t0039", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "split": "train", "seed": 39, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-t0039", "title": "Hand-arm vibration for 4 operators", "checks": 9, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d2-t0040", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "split": "train", "seed": 40, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-t0040", "title": "Airborne exposure for 5 workers", "checks": 16, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d2-t0041", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "split": "train", "seed": 41, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-t0041", "title": "Injury rates for 2022", "checks": 22, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2022 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d2-t0042", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "split": "train", "seed": 42, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-t0042", "title": "Noise exposure for 5 workers", "checks": 16, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d2-t0043", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "split": "train", "seed": 43, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-t0043", "title": "Hand-arm vibration for 5 operators", "checks": 18, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d3-t0044", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "split": "train", "seed": 44, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-t0044", "title": "Airborne exposure for 4 workers", "checks": 27, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d3-t0045", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "split": "train", "seed": 45, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-t0045", "title": "Injury rates for 2024", "checks": 29, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2023 and 2024 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2024, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (3 decimals), all for 2024.\n- `site`: an object keyed by year (`\"2023\"` and `\"2024\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2024 minus the site LTIFR for 2023, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2024 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2024 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d3-t0046", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "split": "train", "seed": 46, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-t0046", "title": "Noise exposure for 4 workers", "checks": 30, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d3-t0047", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "split": "train", "seed": 47, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-t0047", "title": "Hand-arm vibration for 5 operators", "checks": 30, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d1-t0048", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "split": "train", "seed": 48, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-t0048", "title": "Airborne exposure for 3 workers", "checks": 7, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d1-t0049", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "split": "train", "seed": 49, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-t0049", "title": "Injury rates for 2021", "checks": 6, "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2021 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 3 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d1-t0050", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "split": "train", "seed": 50, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-t0050", "title": "Noise exposure for 3 workers", "checks": 7, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d1-t0051", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "split": "train", "seed": 51, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-t0051", "title": "Hand-arm vibration for 4 operators", "checks": 9, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d2-t0052", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "split": "train", "seed": 52, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-t0052", "title": "Airborne exposure for 5 workers", "checks": 16, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d2-t0053", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "split": "train", "seed": 53, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-t0053", "title": "Injury rates for 2022", "checks": 22, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2022 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d2-t0054", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "split": "train", "seed": 54, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-t0054", "title": "Noise exposure for 5 workers", "checks": 16, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d2-t0055", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "split": "train", "seed": 55, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-t0055", "title": "Hand-arm vibration for 5 operators", "checks": 18, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d3-t0056", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "split": "train", "seed": 56, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-t0056", "title": "Airborne exposure for 4 workers", "checks": 30, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d3-t0057", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "split": "train", "seed": 57, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-t0057", "title": "Injury rates for 2024", "checks": 29, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2023 and 2024 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2024, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals), all for 2024.\n- `site`: an object keyed by year (`\"2023\"` and `\"2024\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2024 minus the site LTIFR for 2023, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2024 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2024 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d3-t0058", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "split": "train", "seed": 58, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-t0058", "title": "Noise exposure for 4 workers", "checks": 27, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d3-t0059", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "split": "train", "seed": 59, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-t0059", "title": "Hand-arm vibration for 5 operators", "checks": 30, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d1-t0060", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "split": "train", "seed": 60, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-t0060", "title": "Airborne exposure for 3 workers", "checks": 7, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d1-t0061", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "split": "train", "seed": 61, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-t0061", "title": "Injury rates for 2022", "checks": 6, "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2022 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 2 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d1-t0062", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "split": "train", "seed": 62, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-t0062", "title": "Noise exposure for 3 workers", "checks": 7, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d1-t0063", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "split": "train", "seed": 63, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-t0063", "title": "Hand-arm vibration for 4 operators", "checks": 9, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d2-t0064", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "split": "train", "seed": 64, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-t0064", "title": "Airborne exposure for 5 workers", "checks": 16, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d2-t0065", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "split": "train", "seed": 65, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-t0065", "title": "Injury rates for 2021", "checks": 22, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2021 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d2-t0066", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "split": "train", "seed": 66, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-t0066", "title": "Noise exposure for 5 workers", "checks": 16, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d2-t0067", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "split": "train", "seed": 67, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-t0067", "title": "Hand-arm vibration for 5 operators", "checks": 18, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d3-t0068", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "split": "train", "seed": 68, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-t0068", "title": "Airborne exposure for 4 workers", "checks": 27, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d3-t0069", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "split": "train", "seed": 69, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-t0069", "title": "Injury rates for 2023", "checks": 29, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2022 and 2023 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2023, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals), all for 2023.\n- `site`: an object keyed by year (`\"2022\"` and `\"2023\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2023 minus the site LTIFR for 2022, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2023 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2023 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d3-t0070", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "split": "train", "seed": 70, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-t0070", "title": "Noise exposure for 4 workers", "checks": 30, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d3-t0071", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "split": "train", "seed": 71, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-t0071", "title": "Hand-arm vibration for 5 operators", "checks": 30, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d1-t0072", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "split": "train", "seed": 72, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-t0072", "title": "Airborne exposure for 3 workers", "checks": 7, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d1-t0073", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "split": "train", "seed": 73, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-t0073", "title": "Injury rates for 2021", "checks": 6, "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2021 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 2 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d1-t0074", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "split": "train", "seed": 74, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-t0074", "title": "Noise exposure for 3 workers", "checks": 7, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d1-t0075", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "split": "train", "seed": 75, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-t0075", "title": "Hand-arm vibration for 4 operators", "checks": 9, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d2-t0076", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "split": "train", "seed": 76, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-t0076", "title": "Airborne exposure for 5 workers", "checks": 16, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d2-t0077", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "split": "train", "seed": 77, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-t0077", "title": "Injury rates for 2024", "checks": 22, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2024 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d2-t0078", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "split": "train", "seed": 78, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-t0078", "title": "Noise exposure for 5 workers", "checks": 16, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d2-t0079", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "split": "train", "seed": 79, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-t0079", "title": "Hand-arm vibration for 5 operators", "checks": 18, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d3-t0080", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "split": "train", "seed": 80, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-t0080", "title": "Airborne exposure for 4 workers", "checks": 30, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d3-t0081", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "split": "train", "seed": 81, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-t0081", "title": "Injury rates for 2024", "checks": 29, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2023 and 2024 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2024, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals), all for 2024.\n- `site`: an object keyed by year (`\"2023\"` and `\"2024\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2024 minus the site LTIFR for 2023, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2024 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2024 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d3-t0082", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "split": "train", "seed": 82, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-t0082", "title": "Noise exposure for 4 workers", "checks": 30, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d3-t0083", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "split": "train", "seed": 83, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-t0083", "title": "Hand-arm vibration for 5 operators", "checks": 30, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d1-e0000", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "split": "eval", "seed": 10000, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-e0000", "title": "Airborne exposure for 3 workers", "checks": 7, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d1-e0001", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "split": "eval", "seed": 10001, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-e0001", "title": "Injury rates for 2024", "checks": 6, "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2024 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 2 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d1-e0002", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "split": "eval", "seed": 10002, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-e0002", "title": "Noise exposure for 3 workers", "checks": 7, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d1-e0003", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "split": "eval", "seed": 10003, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-e0003", "title": "Hand-arm vibration for 4 operators", "checks": 9, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d2-e0004", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "split": "eval", "seed": 10004, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-e0004", "title": "Airborne exposure for 5 workers", "checks": 16, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d2-e0005", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "split": "eval", "seed": 10005, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-e0005", "title": "Injury rates for 2022", "checks": 22, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2022 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (3 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d2-e0006", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "split": "eval", "seed": 10006, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-e0006", "title": "Noise exposure for 5 workers", "checks": 16, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d2-e0007", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "split": "eval", "seed": 10007, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-e0007", "title": "Hand-arm vibration for 5 operators", "checks": 18, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d3-e0008", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "split": "eval", "seed": 10008, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-e0008", "title": "Airborne exposure for 4 workers", "checks": 33, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d3-e0009", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "split": "eval", "seed": 10009, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-e0009", "title": "Injury rates for 2023", "checks": 29, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2022 and 2023 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2023, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (3 decimals), all for 2023.\n- `site`: an object keyed by year (`\"2022\"` and `\"2023\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2023 minus the site LTIFR for 2022, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2023 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2023 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d3-e0010", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "split": "eval", "seed": 10010, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-e0010", "title": "Noise exposure for 4 workers", "checks": 25, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d3-e0011", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "split": "eval", "seed": 10011, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-e0011", "title": "Hand-arm vibration for 5 operators", "checks": 30, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d1-e0012", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 1, "split": "eval", "seed": 10012, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d1-e0012", "title": "Airborne exposure for 3 workers", "checks": 7, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the personal air samples taken on three workers during one 8-hour shift: the minutes each sample ran and the concentration it found, in mg/m3. Each worker was sampled for one substance.\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) is\n\n TWA = sum( C_i * t_i ) / 480\n\nwith C_i the concentration of sample i and t_i its duration in minutes. Time that was not sampled counts as zero exposure.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d1-e0013", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 1, "split": "eval", "seed": 10013, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d1-e0013", "title": "Injury rates for 2021", "checks": 6, "instruction": "# Incident statistics\n\n`incident_log.csv` is one site's incident log for 2021 and `hours_worked.csv` gives the hours worked each month. `definitions.md` says what counts as a lost-time injury and how the rates are defined.\n\nWork out the site's figures for the year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `lti_count`: the number of lost-time injuries, an integer.\n- `days_lost`: the total days lost through those injuries, an integer.\n- `hours_worked`: the total hours worked in the year, an integer.\n- `ltifr`: the frequency rate, 2 decimals.\n- `severity_rate`: the severity rate, 2 decimals.\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d1-e0014", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 1, "split": "eval", "seed": 10014, "path": "tasks/exposure-assessment/exposure-assessment-noise-d1-e0014", "title": "Noise exposure for 3 workers", "checks": 7, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day: the tasks each worker did, the minutes spent on each and the level measured for that task (`laeq_db`, in dB(A)). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d1-e0015", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 1, "split": "eval", "seed": 10015, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d1-e0015", "title": "Hand-arm vibration for 4 operators", "checks": 9, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` lists the vibrating tools each operator used today, the vibration magnitude measured at the handle (`vibration_m_s2`) and the trigger time in minutes. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d2-e0016", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 2, "split": "eval", "seed": 10016, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d2-e0016", "title": "Airborne exposure for 5 workers", "checks": 16, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day (each worker was sampled for one substance) and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `twa_mg_m3`: the 8-hour TWA in mg/m3, 2 decimals.\n - `twa_ppm`: the same TWA expressed in ppm, 2 decimals.\n - `exposure_index`: the TWA divided by the limit for that substance, 2 decimals.\n- `over_limit`: list of the worker ids whose exposure index is above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d2-e0017", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 2, "split": "eval", "seed": 10017, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d2-e0017", "title": "Injury rates for 2023", "checks": 22, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2023 and `hours_worked.csv` gives the hours worked by each department's employees each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is.\n\nWork out the figures for each department and for the site as a whole.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals).\n- `site`: the same five keys for all departments together.\n- `above_target`: list of the departments whose LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d2-e0018", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 2, "split": "eval", "seed": 10018, "path": "tasks/exposure-assessment/exposure-assessment-noise-d2-e0018", "title": "Noise exposure for 5 workers", "checks": 16, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working day, with a start and end time (24-hour clock) for each task. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `planned_work.csv` names, for each worker, one task the supervisor would like to add after the work in the diary. `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `lex8h_db`: the daily personal noise exposure L_EX,8h from the diary, in dB(A), 1 decimal.\n - `band`: the band of that exposure, one of the four names in `exposure_values.md`.\n - `extra_minutes`: the largest whole number of minutes of the planned task that can be added to the diary with L_EX,8h staying at or below the limit value. Work out the exact time at which L_EX,8h would equal the limit value and round it down to whole minutes. Give 0 if the diary alone is already above the limit value.\n- `at_or_above_upper_action`: list of the worker ids whose L_EX,8h is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d2-e0019", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 2, "split": "eval", "seed": 10019, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d2-e0019", "title": "Hand-arm vibration for 5 operators", "checks": 18, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives the vibration magnitude of each tool (`vibration_m_s2`). `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n- `tools`: an object keyed by tool id, each with `minutes_to_action`: the minutes of use of that tool alone at which A(8) equals the exposure action value, 1 decimal.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-chemicals-d3-e0020", "env": "exposure-assessment", "isced_f": "1022", "family": "chemicals", "difficulty": 3, "split": "eval", "seed": 10020, "path": "tasks/exposure-assessment/exposure-assessment-chemicals-d3-e0020", "title": "Airborne exposure for 4 workers", "checks": 33, "instruction": "# Airborne chemical exposure\n\n`samples.csv` holds the air samples from one survey day and `workers.csv` gives each worker's shift length and how to treat the time that was not sampled. Use only the rows with `sample_type` `personal`: static (area) samples and field blanks are not part of a worker's exposure. Some concentrations are in ppm and some in mg/m3 (see `unit`). Convert with\n\n mg/m3 = ppm * M / 24.45 (M is the molar mass in g/mol)\n\n`oel_table.csv` gives, for each substance, its molar mass and the 8-hour occupational exposure limit to use in this exercise. Use these values; they are not presented as any country's legal limits. The table lists more substances than were sampled. Some limits are tabled in ppm and some in mg/m3 (see `oel_unit`); convert the ppm ones to mg/m3 with the same formula.\n\nThe 8-hour time-weighted average (TWA) always uses 480 minutes as the reference period, whatever the shift length. With C_i the concentration of personal sample i in mg/m3 and t_i its duration in minutes:\n\n- `unsampled_time` = `zero`: time outside the samples counts as zero exposure, so TWA = sum( C_i * t_i ) / 480.\n- `unsampled_time` = `as_sampled`: the whole shift is taken to be at the time-weighted mean of the sampled periods, so TWA = ( sum( C_i * t_i ) / sum( t_i ) ) * shift_min / 480.\n\nEach worker was sampled for two or three substances; work out a TWA for each. Substances in the same `effect_group` act together, so for each worker and each effect group add up the exposure indices of that worker's substances in the group (the additive mixture index, sum of C_i / OEL_i). A group with one substance has that substance's index.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `substances`: an object keyed by substance name, each with `twa_mg_m3` (the 8-hour TWA in mg/m3, 2 decimals) and `exposure_index` (the TWA divided by the limit in mg/m3, 2 decimals).\n - `group_index`: an object keyed by effect group (only the groups that worker has a substance in) giving the additive mixture index, 2 decimals.\n- `over_limit`: list of the worker ids with at least one group index above 1 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-incidents-d3-e0021", "env": "exposure-assessment", "isced_f": "1022", "family": "incidents", "difficulty": 3, "split": "eval", "seed": 10021, "path": "tasks/exposure-assessment/exposure-assessment-incidents-d3-e0021", "title": "Injury rates for 2021", "checks": 29, "instruction": "# Incident statistics\n\n`incident_log.csv` is a site's incident log for 2020 and 2021 and `hours_worked.csv` gives the hours worked in each department each month. `definitions.md` says what counts as a lost-time injury, how the rates are defined and what the target is. An incident belongs to the year of its `date`.\n\nWork out the figures for each department for 2021, and for the site as a whole for both years.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `departments`: an object keyed by department name, each with `lti_count` (integer), `days_lost` (integer, total days lost through LTIs, after the cap), `hours_worked` (integer), `ltifr` (2 decimals) and `severity_rate` (2 decimals), all for 2021.\n- `site`: an object keyed by year (`\"2020\"` and `\"2021\"`), each with `lti_count`, `ltifr` and `severity_rate` for all departments together in that year.\n- `ltifr_change`: the site LTIFR for 2021 minus the site LTIFR for 2020, 2 decimals (negative if the rate fell). Use unrounded rates for the subtraction.\n- `above_target`: list of the departments whose 2021 LTIFR is above the target (any order; an empty list if none).\n- `lti_ids`: list of the incident ids counted as lost-time injuries in 2021 (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-noise-d3-e0022", "env": "exposure-assessment", "isced_f": "1022", "family": "noise", "difficulty": 3, "split": "eval", "seed": 10022, "path": "tasks/exposure-assessment/exposure-assessment-noise-d3-e0022", "title": "Noise exposure for 4 workers", "checks": 25, "instruction": "# Noise exposure assessment\n\n`noise_diary.csv` is the task diary for one working week, with a start and end time (24-hour clock) for each task. Workers do not all work the same days. `task_levels.csv` gives the level measured for each task (`laeq_db`, in dB(A); the peak level `lcpeak_db` is not needed). `exposure_values.md` gives the action and limit values to use and the band names.\n\nFor each worker and each day worked the daily personal noise exposure is\n\n L_EX,8h = 10 * log10( (1/8) * sum( t_i * 10^(L_i/10) ) )\n\nwith t_i the time spent on task i in hours and L_i the A-weighted equivalent level of that task in dB(A). Time that is not in the diary contributes nothing.\n\nThe weekly exposure is normalised to five 8-hour days whatever the number of days worked:\n\n L_EX,w = 10 * log10( (1/5) * sum over the days worked of 10^(L_EX,8h/10) )\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `workers`: an object keyed by worker id, each with\n - `daily_lex8h_db`: an object keyed by day (`Mon` to `Fri`, only the days that worker worked) giving L_EX,8h for that day in dB(A), 1 decimal.\n - `weekly_lex_db`: the weekly noise exposure in dB(A), 1 decimal.\n - `loudest_day`: the day with the highest L_EX,8h.\n - `band`: the band of the weekly exposure, one of the four names in `exposure_values.md`.\n- `at_or_above_upper_action`: list of the worker ids whose weekly exposure is at or above the upper action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "exposure-assessment-vibration-d3-e0023", "env": "exposure-assessment", "isced_f": "1022", "family": "vibration", "difficulty": 3, "split": "eval", "seed": 10023, "path": "tasks/exposure-assessment/exposure-assessment-vibration-d3-e0023", "title": "Hand-arm vibration for 5 operators", "checks": 30, "instruction": "# Hand-arm vibration assessment\n\n`tool_use.csv` is today's tool log. Each row is a batch of identical operations with one tool: the exposure time of the row is `operations` times `seconds_per_operation`. An operator may have several rows for the same tool; add their times together. `tools.csv` gives each tool's frequency-weighted acceleration on three axes. The magnitude to use for a tool is the vibration total value\n\n a = sqrt( ax^2 + ay^2 + az^2 )\n\nDo not round it before using it. `vibration_values.md` gives the exposure action and limit values to use and the band names.\n\nFor each operator the daily vibration exposure is\n\n A(8) = sqrt( sum( a_i^2 * t_i ) / 8 )\n\nwith a_i the vibration magnitude of tool i in m/s2 and t_i the time the operator's hands were exposed to it, in hours.\n\nFor each tool in `tools.csv` (whether or not it was used today), also work out how long the tool could be used on its own before A(8) reaches a given value:\n\n time in minutes = 480 * ( value / a )^2\n\nThe result may be longer than a working day; report it as calculated.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `operators`: an object keyed by operator id, each with\n - `a8_m_s2`: the daily exposure A(8) in m/s2, 2 decimals.\n - `band`: one of the three band names in `vibration_values.md`.\n - `dominant_tool`: the tool id that contributes most to this operator's exposure, that is the one with the largest a_i^2 * t_i.\n- `tools`: an object keyed by tool id, each with `minutes_to_action` and `minutes_to_limit`: the minutes of use of that tool alone at which A(8) equals the exposure action value and the exposure limit value, 1 decimal each.\n- `at_or_above_action`: list of the operator ids whose A(8) is at or above the exposure action value, including any above the limit value (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "harris-matrix-dating-d1-t0000", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "split": "train", "seed": 0, "path": "tasks/harris-matrix/harris-matrix-dating-d1-t0000", "title": "Dating 8 contexts from their finds", "checks": 8, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d1-t0001", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "split": "train", "seed": 1, "path": "tasks/harris-matrix/harris-matrix-errors-d1-t0001", "title": "Impossible relations among 8 contexts", "checks": 14, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 12 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d1-t0002", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "split": "train", "seed": 2, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-t0002", "title": "Reduced matrix for 9 contexts", "checks": 11, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d1-t0003", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "split": "train", "seed": 3, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-t0003", "title": "Stratigraphic sequence of 9 contexts", "checks": 13, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d2-t0004", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "split": "train", "seed": 4, "path": "tasks/harris-matrix/harris-matrix-dating-d2-t0004", "title": "Dating 14 contexts from their finds", "checks": 12, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d2-t0005", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "split": "train", "seed": 5, "path": "tasks/harris-matrix/harris-matrix-errors-d2-t0005", "title": "Impossible relations among 13 contexts", "checks": 19, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts, 20 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d2-t0006", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "split": "train", "seed": 6, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-t0006", "title": "Reduced matrix for 13 contexts", "checks": 15, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts, 15 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d2-t0007", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "split": "train", "seed": 7, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-t0007", "title": "Stratigraphic sequence of 14 contexts", "checks": 18, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d3-t0008", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "split": "train", "seed": 8, "path": "tasks/harris-matrix/harris-matrix-dating-d3-t0008", "title": "Dating 16 contexts from their finds", "checks": 21, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order)."} +{"id": "harris-matrix-errors-d3-t0009", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "split": "train", "seed": 9, "path": "tasks/harris-matrix/harris-matrix-errors-d3-t0009", "title": "Impossible relations among 19 contexts", "checks": 25, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 24 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d3-t0010", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "split": "train", "seed": 10, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-t0010", "title": "Reduced matrix for 19 contexts", "checks": 21, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 31 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d3-t0011", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "split": "train", "seed": 11, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-t0011", "title": "Stratigraphic sequence of 21 contexts", "checks": 26, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once."} +{"id": "harris-matrix-dating-d1-t0012", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "split": "train", "seed": 12, "path": "tasks/harris-matrix/harris-matrix-dating-d1-t0012", "title": "Dating 8 contexts from their finds", "checks": 6, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d1-t0013", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "split": "train", "seed": 13, "path": "tasks/harris-matrix/harris-matrix-errors-d1-t0013", "title": "Impossible relations among 8 contexts", "checks": 14, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d1-t0014", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "split": "train", "seed": 14, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-t0014", "title": "Reduced matrix for 8 contexts", "checks": 10, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d1-t0015", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "split": "train", "seed": 15, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-t0015", "title": "Stratigraphic sequence of 9 contexts", "checks": 13, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d2-t0016", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "split": "train", "seed": 16, "path": "tasks/harris-matrix/harris-matrix-dating-d2-t0016", "title": "Dating 12 contexts from their finds", "checks": 9, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (12 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d2-t0017", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "split": "train", "seed": 17, "path": "tasks/harris-matrix/harris-matrix-errors-d2-t0017", "title": "Impossible relations among 14 contexts", "checks": 20, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 17 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d2-t0018", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "split": "train", "seed": 18, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-t0018", "title": "Reduced matrix for 14 contexts", "checks": 16, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 20 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d2-t0019", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "split": "train", "seed": 19, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-t0019", "title": "Stratigraphic sequence of 13 contexts", "checks": 17, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d3-t0020", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "split": "train", "seed": 20, "path": "tasks/harris-matrix/harris-matrix-dating-d3-t0020", "title": "Dating 17 contexts from their finds", "checks": 28, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (17 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order)."} +{"id": "harris-matrix-errors-d3-t0021", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "split": "train", "seed": 21, "path": "tasks/harris-matrix/harris-matrix-errors-d3-t0021", "title": "Impossible relations among 19 contexts", "checks": 25, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 28 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d3-t0022", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "split": "train", "seed": 22, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-t0022", "title": "Reduced matrix for 21 contexts", "checks": 23, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts, 34 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d3-t0023", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "split": "train", "seed": 23, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-t0023", "title": "Stratigraphic sequence of 21 contexts", "checks": 26, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once."} +{"id": "harris-matrix-dating-d1-t0024", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "split": "train", "seed": 24, "path": "tasks/harris-matrix/harris-matrix-dating-d1-t0024", "title": "Dating 9 contexts from their finds", "checks": 9, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d1-t0025", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "split": "train", "seed": 25, "path": "tasks/harris-matrix/harris-matrix-errors-d1-t0025", "title": "Impossible relations among 8 contexts", "checks": 14, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d1-t0026", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "split": "train", "seed": 26, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-t0026", "title": "Reduced matrix for 8 contexts", "checks": 10, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 12 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d1-t0027", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "split": "train", "seed": 27, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-t0027", "title": "Stratigraphic sequence of 9 contexts", "checks": 13, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d2-t0028", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "split": "train", "seed": 28, "path": "tasks/harris-matrix/harris-matrix-dating-d2-t0028", "title": "Dating 14 contexts from their finds", "checks": 11, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d2-t0029", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "split": "train", "seed": 29, "path": "tasks/harris-matrix/harris-matrix-errors-d2-t0029", "title": "Impossible relations among 14 contexts", "checks": 20, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 20 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d2-t0030", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "split": "train", "seed": 30, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-t0030", "title": "Reduced matrix for 15 contexts", "checks": 17, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (15 contexts, 19 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d2-t0031", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "split": "train", "seed": 31, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-t0031", "title": "Stratigraphic sequence of 16 contexts", "checks": 20, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d3-t0032", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "split": "train", "seed": 32, "path": "tasks/harris-matrix/harris-matrix-dating-d3-t0032", "title": "Dating 18 contexts from their finds", "checks": 23, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (18 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order)."} +{"id": "harris-matrix-errors-d3-t0033", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "split": "train", "seed": 33, "path": "tasks/harris-matrix/harris-matrix-errors-d3-t0033", "title": "Impossible relations among 19 contexts", "checks": 25, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 25 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d3-t0034", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "split": "train", "seed": 34, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-t0034", "title": "Reduced matrix for 19 contexts", "checks": 21, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 26 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d3-t0035", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "split": "train", "seed": 35, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-t0035", "title": "Stratigraphic sequence of 21 contexts", "checks": 26, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once."} +{"id": "harris-matrix-dating-d1-t0036", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "split": "train", "seed": 36, "path": "tasks/harris-matrix/harris-matrix-dating-d1-t0036", "title": "Dating 9 contexts from their finds", "checks": 5, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d1-t0037", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "split": "train", "seed": 37, "path": "tasks/harris-matrix/harris-matrix-errors-d1-t0037", "title": "Impossible relations among 8 contexts", "checks": 14, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 12 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d1-t0038", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "split": "train", "seed": 38, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-t0038", "title": "Reduced matrix for 8 contexts", "checks": 10, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 9 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d1-t0039", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "split": "train", "seed": 39, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-t0039", "title": "Stratigraphic sequence of 8 contexts", "checks": 12, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d2-t0040", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "split": "train", "seed": 40, "path": "tasks/harris-matrix/harris-matrix-dating-d2-t0040", "title": "Dating 14 contexts from their finds", "checks": 11, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d2-t0041", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "split": "train", "seed": 41, "path": "tasks/harris-matrix/harris-matrix-errors-d2-t0041", "title": "Impossible relations among 14 contexts", "checks": 20, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 20 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d2-t0042", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "split": "train", "seed": 42, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-t0042", "title": "Reduced matrix for 15 contexts", "checks": 17, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (15 contexts, 21 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d2-t0043", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "split": "train", "seed": 43, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-t0043", "title": "Stratigraphic sequence of 14 contexts", "checks": 18, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d3-t0044", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "split": "train", "seed": 44, "path": "tasks/harris-matrix/harris-matrix-dating-d3-t0044", "title": "Dating 16 contexts from their finds", "checks": 17, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order)."} +{"id": "harris-matrix-errors-d3-t0045", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "split": "train", "seed": 45, "path": "tasks/harris-matrix/harris-matrix-errors-d3-t0045", "title": "Impossible relations among 19 contexts", "checks": 25, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 27 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d3-t0046", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "split": "train", "seed": 46, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-t0046", "title": "Reduced matrix for 21 contexts", "checks": 23, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts, 28 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d3-t0047", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "split": "train", "seed": 47, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-t0047", "title": "Stratigraphic sequence of 20 contexts", "checks": 25, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (20 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once."} +{"id": "harris-matrix-dating-d1-t0048", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "split": "train", "seed": 48, "path": "tasks/harris-matrix/harris-matrix-dating-d1-t0048", "title": "Dating 9 contexts from their finds", "checks": 8, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d1-t0049", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "split": "train", "seed": 49, "path": "tasks/harris-matrix/harris-matrix-errors-d1-t0049", "title": "Impossible relations among 8 contexts", "checks": 14, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 13 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d1-t0050", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "split": "train", "seed": 50, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-t0050", "title": "Reduced matrix for 9 contexts", "checks": 11, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d1-t0051", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "split": "train", "seed": 51, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-t0051", "title": "Stratigraphic sequence of 9 contexts", "checks": 13, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d2-t0052", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "split": "train", "seed": 52, "path": "tasks/harris-matrix/harris-matrix-dating-d2-t0052", "title": "Dating 15 contexts from their finds", "checks": 9, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (15 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d2-t0053", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "split": "train", "seed": 53, "path": "tasks/harris-matrix/harris-matrix-errors-d2-t0053", "title": "Impossible relations among 13 contexts", "checks": 19, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts, 17 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d2-t0054", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "split": "train", "seed": 54, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-t0054", "title": "Reduced matrix for 16 contexts", "checks": 18, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts, 21 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d2-t0055", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "split": "train", "seed": 55, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-t0055", "title": "Stratigraphic sequence of 14 contexts", "checks": 18, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d3-t0056", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "split": "train", "seed": 56, "path": "tasks/harris-matrix/harris-matrix-dating-d3-t0056", "title": "Dating 16 contexts from their finds", "checks": 16, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order)."} +{"id": "harris-matrix-errors-d3-t0057", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "split": "train", "seed": 57, "path": "tasks/harris-matrix/harris-matrix-errors-d3-t0057", "title": "Impossible relations among 19 contexts", "checks": 25, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 29 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d3-t0058", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "split": "train", "seed": 58, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-t0058", "title": "Reduced matrix for 21 contexts", "checks": 23, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts, 30 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d3-t0059", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "split": "train", "seed": 59, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-t0059", "title": "Stratigraphic sequence of 19 contexts", "checks": 24, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once."} +{"id": "harris-matrix-dating-d1-t0060", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "split": "train", "seed": 60, "path": "tasks/harris-matrix/harris-matrix-dating-d1-t0060", "title": "Dating 9 contexts from their finds", "checks": 6, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d1-t0061", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "split": "train", "seed": 61, "path": "tasks/harris-matrix/harris-matrix-errors-d1-t0061", "title": "Impossible relations among 8 contexts", "checks": 14, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d1-t0062", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "split": "train", "seed": 62, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-t0062", "title": "Reduced matrix for 9 contexts", "checks": 11, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d1-t0063", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "split": "train", "seed": 63, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-t0063", "title": "Stratigraphic sequence of 9 contexts", "checks": 13, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d2-t0064", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "split": "train", "seed": 64, "path": "tasks/harris-matrix/harris-matrix-dating-d2-t0064", "title": "Dating 15 contexts from their finds", "checks": 10, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (15 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d2-t0065", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "split": "train", "seed": 65, "path": "tasks/harris-matrix/harris-matrix-errors-d2-t0065", "title": "Impossible relations among 13 contexts", "checks": 19, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts, 18 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d2-t0066", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "split": "train", "seed": 66, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-t0066", "title": "Reduced matrix for 13 contexts", "checks": 15, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts, 16 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d2-t0067", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "split": "train", "seed": 67, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-t0067", "title": "Stratigraphic sequence of 14 contexts", "checks": 18, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d3-t0068", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "split": "train", "seed": 68, "path": "tasks/harris-matrix/harris-matrix-dating-d3-t0068", "title": "Dating 16 contexts from their finds", "checks": 25, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order)."} +{"id": "harris-matrix-errors-d3-t0069", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "split": "train", "seed": 69, "path": "tasks/harris-matrix/harris-matrix-errors-d3-t0069", "title": "Impossible relations among 19 contexts", "checks": 25, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 30 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d3-t0070", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "split": "train", "seed": 70, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-t0070", "title": "Reduced matrix for 21 contexts", "checks": 23, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts, 33 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d3-t0071", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "split": "train", "seed": 71, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-t0071", "title": "Stratigraphic sequence of 20 contexts", "checks": 25, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (20 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once."} +{"id": "harris-matrix-dating-d1-t0072", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "split": "train", "seed": 72, "path": "tasks/harris-matrix/harris-matrix-dating-d1-t0072", "title": "Dating 9 contexts from their finds", "checks": 9, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d1-t0073", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "split": "train", "seed": 73, "path": "tasks/harris-matrix/harris-matrix-errors-d1-t0073", "title": "Impossible relations among 8 contexts", "checks": 14, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 12 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d1-t0074", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "split": "train", "seed": 74, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-t0074", "title": "Reduced matrix for 8 contexts", "checks": 10, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 9 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d1-t0075", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "split": "train", "seed": 75, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-t0075", "title": "Stratigraphic sequence of 9 contexts", "checks": 13, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d2-t0076", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "split": "train", "seed": 76, "path": "tasks/harris-matrix/harris-matrix-dating-d2-t0076", "title": "Dating 15 contexts from their finds", "checks": 14, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (15 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d2-t0077", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "split": "train", "seed": 77, "path": "tasks/harris-matrix/harris-matrix-errors-d2-t0077", "title": "Impossible relations among 13 contexts", "checks": 19, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts, 19 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d2-t0078", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "split": "train", "seed": 78, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-t0078", "title": "Reduced matrix for 13 contexts", "checks": 15, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts, 18 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d2-t0079", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "split": "train", "seed": 79, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-t0079", "title": "Stratigraphic sequence of 16 contexts", "checks": 20, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d3-t0080", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "split": "train", "seed": 80, "path": "tasks/harris-matrix/harris-matrix-dating-d3-t0080", "title": "Dating 18 contexts from their finds", "checks": 23, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (18 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order)."} +{"id": "harris-matrix-errors-d3-t0081", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "split": "train", "seed": 81, "path": "tasks/harris-matrix/harris-matrix-errors-d3-t0081", "title": "Impossible relations among 19 contexts", "checks": 25, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 27 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d3-t0082", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "split": "train", "seed": 82, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-t0082", "title": "Reduced matrix for 20 contexts", "checks": 22, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (20 contexts, 26 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d3-t0083", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "split": "train", "seed": 83, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-t0083", "title": "Stratigraphic sequence of 19 contexts", "checks": 24, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once."} +{"id": "harris-matrix-dating-d1-e0000", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "split": "eval", "seed": 10000, "path": "tasks/harris-matrix/harris-matrix-dating-d1-e0000", "title": "Dating 8 contexts from their finds", "checks": 7, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d1-e0001", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "split": "eval", "seed": 10001, "path": "tasks/harris-matrix/harris-matrix-errors-d1-e0001", "title": "Impossible relations among 8 contexts", "checks": 14, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d1-e0002", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "split": "eval", "seed": 10002, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-e0002", "title": "Reduced matrix for 9 contexts", "checks": 11, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts, 11 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d1-e0003", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "split": "eval", "seed": 10003, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-e0003", "title": "Stratigraphic sequence of 8 contexts", "checks": 12, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d2-e0004", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "split": "eval", "seed": 10004, "path": "tasks/harris-matrix/harris-matrix-dating-d2-e0004", "title": "Dating 13 contexts from their finds", "checks": 10, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d2-e0005", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "split": "eval", "seed": 10005, "path": "tasks/harris-matrix/harris-matrix-errors-d2-e0005", "title": "Impossible relations among 14 contexts", "checks": 20, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 20 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d2-e0006", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "split": "eval", "seed": 10006, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-e0006", "title": "Reduced matrix for 14 contexts", "checks": 16, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 19 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d2-e0007", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "split": "eval", "seed": 10007, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-e0007", "title": "Stratigraphic sequence of 16 contexts", "checks": 20, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d3-e0008", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "split": "eval", "seed": 10008, "path": "tasks/harris-matrix/harris-matrix-dating-d3-e0008", "title": "Dating 16 contexts from their finds", "checks": 21, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (16 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order)."} +{"id": "harris-matrix-errors-d3-e0009", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "split": "eval", "seed": 10009, "path": "tasks/harris-matrix/harris-matrix-errors-d3-e0009", "title": "Impossible relations among 19 contexts", "checks": 25, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 26 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d3-e0010", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "split": "eval", "seed": 10010, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-e0010", "title": "Reduced matrix for 21 contexts", "checks": 23, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts, 32 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d3-e0011", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "split": "eval", "seed": 10011, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-e0011", "title": "Stratigraphic sequence of 21 contexts", "checks": 26, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (21 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once."} +{"id": "harris-matrix-dating-d1-e0012", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 1, "split": "eval", "seed": 10012, "path": "tasks/harris-matrix/harris-matrix-dating-d1-e0012", "title": "Dating 9 contexts from their finds", "checks": 8, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts) and `finds.csv` lists the finds from each context. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d1-e0013", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 1, "split": "eval", "seed": 10013, "path": "tasks/harris-matrix/harris-matrix-errors-d1-e0013", "title": "Impossible relations among 8 contexts", "checks": 14, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts, 10 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d1-e0014", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 1, "split": "eval", "seed": 10014, "path": "tasks/harris-matrix/harris-matrix-reduction-d1-e0014", "title": "Reduced matrix for 9 contexts", "checks": 11, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (9 contexts, 12 recorded relations). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d1-e0015", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 1, "split": "eval", "seed": 10015, "path": "tasks/harris-matrix/harris-matrix-sequence-d1-e0015", "title": "Stratigraphic sequence of 8 contexts", "checks": 12, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (8 contexts). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d2-e0016", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 2, "split": "eval", "seed": 10016, "path": "tasks/harris-matrix/harris-matrix-dating-d2-e0016", "title": "Dating 13 contexts from their finds", "checks": 12, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (13 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order)."} +{"id": "harris-matrix-errors-d2-e0017", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 2, "split": "eval", "seed": 10017, "path": "tasks/harris-matrix/harris-matrix-errors-d2-e0017", "title": "Impossible relations among 14 contexts", "checks": 20, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 18 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: one recorded relation is wrong. There is exactly one way to make the record consistent by deleting one row of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the one `relation_id` to delete.\n\nThen delete that row and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d2-e0018", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 2, "split": "eval", "seed": 10018, "path": "tasks/harris-matrix/harris-matrix-reduction-d2-e0018", "title": "Reduced matrix for 14 contexts", "checks": 16, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts, 19 recorded relations). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d2-e0019", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 2, "split": "eval", "seed": 10019, "path": "tasks/harris-matrix/harris-matrix-sequence-d2-e0019", "title": "Stratigraphic sequence of 14 contexts", "checks": 18, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (14 contexts). Some deposits were recorded under more than one context number (`same as`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-dating-d3-e0020", "env": "harris-matrix", "isced_f": "0222", "family": "dating", "difficulty": 3, "split": "eval", "seed": 10020, "path": "tasks/harris-matrix/harris-matrix-dating-d3-e0020", "title": "Dating 18 contexts from their finds", "checks": 27, "instruction": "# Harris matrix: dating the sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (18 contexts) and `finds.csv` lists the finds from each context. Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). Some finds carry a flag, and some contexts have a documented year. `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines how contexts are dated.\n\nDate every context from the finds in it and beneath it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `tpq`: an object keyed by context id giving the terminus post quem of every context that has one, as an integer year.\n- `no_tpq`: list of the contexts that have no TPQ (any order).\n- `taq`: an object keyed by context id giving the terminus ante quem of every context that has one, as an integer year.\n- `no_taq`: list of the contexts that have no TAQ (any order)."} +{"id": "harris-matrix-errors-d3-e0021", "env": "harris-matrix", "isced_f": "0222", "family": "errors", "difficulty": 3, "split": "eval", "seed": 10021, "path": "tasks/harris-matrix/harris-matrix-errors-d3-e0021", "title": "Impossible relations among 19 contexts", "checks": 25, "instruction": "# Harris matrix: checking a record for impossible relations\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 29 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nThe record is not consistent: two recorded relations are wrong. There is exactly one way to make the record consistent by deleting two rows of `relations.csv`, and no way to do it by deleting fewer.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cycle_contexts`: list of the contexts that lie on a cycle in the record as it stands (any order).\n- `faulty_relations`: list of the two `relation_id`s to delete.\n\nThen delete those rows and give, for the corrected record:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer."} +{"id": "harris-matrix-reduction-d3-e0022", "env": "harris-matrix", "isced_f": "0222", "family": "reduction", "difficulty": 3, "split": "eval", "seed": 10022, "path": "tasks/harris-matrix/harris-matrix-reduction-d3-e0022", "title": "Reduced matrix for 19 contexts", "checks": 21, "instruction": "# Harris matrix: reducing the record\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (19 contexts, 31 recorded relations). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the reduced matrix.\n\nThe site record notes every physical contact, so it holds more relations than the Harris matrix needs. Reduce it.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `redundant`: list of the `relation_id`s of the recorded relations that are redundant (any order).\n- `reduced_lines`: the number of lines in the reduced matrix, as an integer.\n- `directly_earlier`: an object with one entry for every context id. Each value is the list of the contexts that are directly earlier than that context in the reduced matrix (any order; an empty list if there are none). Where a box holds several contexts, list every one of them."} +{"id": "harris-matrix-sequence-d3-e0023", "env": "harris-matrix", "isced_f": "0222", "family": "sequence", "difficulty": 3, "split": "eval", "seed": 10023, "path": "tasks/harris-matrix/harris-matrix-sequence-d3-e0023", "title": "Stratigraphic sequence of 20 contexts", "checks": 25, "instruction": "# Harris matrix: stratigraphic sequence\n\n`contexts.csv` and `relations.csv` are the stratigraphic record of an excavation (20 contexts). Some deposits were recorded under more than one context number (`same as`). Some relations were entered from the lower context's sheet (`underlies`, `cut by`, `filled by`, `abutted by`). `stratigraphy_rules.md` says what each recorded relation means for the order of the contexts and defines the terms used below.\n\nWork out the order in which the contexts formed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `sequence`: a list of all the context ids, earliest first, that is a valid sequence as the rules define it. Any valid sequence is accepted.\n- `nothing_earlier`: list of the contexts that have no context stratigraphically earlier than them (any order).\n- `nothing_later`: list of the contexts that have no context stratigraphically later than them (any order).\n- `longest_chain`: the length of the longest chain, as an integer number of contexts.\n- `levels`: an object giving the level of every context, as an integer.\n- `unrelated_pairs`: the number of pairs of contexts that are unrelated as the rules define it, as an integer. Count each pair once."} +{"id": "life-table-age-structure-d1-t0000", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "split": "train", "seed": 0, "path": "tasks/life-table/life-table-age-structure-d1-t0000", "title": "Age structure, 1 area(s)", "checks": 8, "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Brinmoor at the end of 2011 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d1-t0001", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "split": "train", "seed": 1, "path": "tasks/life-table/life-table-fertility-d1-t0001", "title": "Fertility measures, 1 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Aldermark in 2020 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d1-t0002", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "split": "train", "seed": 2, "path": "tasks/life-table/life-table-life-table-d1-t0002", "title": "Abridged life table, 8 age groups", "checks": 26, "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2021 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d1-t0003", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "split": "train", "seed": 3, "path": "tasks/life-table/life-table-standardisation-d1-t0003", "title": "Standardised death rates, 3 regions", "checks": 15, "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2022 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Dunholt (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d2-t0004", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "split": "train", "seed": 4, "path": "tasks/life-table/life-table-age-structure-d2-t0004", "title": "Age structure, 1 area(s)", "checks": 10, "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Brinmoor at the end of 2015 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d2-t0005", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "split": "train", "seed": 5, "path": "tasks/life-table/life-table-fertility-d2-t0005", "title": "Fertility measures, 4 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2018 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d2-t0006", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "split": "train", "seed": 6, "path": "tasks/life-table/life-table-life-table-d2-t0006", "title": "Abridged life table, 19 age groups", "checks": 40, "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2019 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d2-t0007", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "split": "train", "seed": 7, "path": "tasks/life-table/life-table-standardisation-d2-t0007", "title": "Standardised death rates, 4 regions", "checks": 20, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2010 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Dunholt (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d3-t0008", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "split": "train", "seed": 8, "path": "tasks/life-table/life-table-age-structure-d3-t0008", "title": "Age structure, 5 area(s)", "checks": 32, "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2021 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d3-t0009", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "split": "train", "seed": 9, "path": "tasks/life-table/life-table-fertility-d3-t0009", "title": "Fertility measures, 5 area(s)", "checks": 13, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2004 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d3-t0010", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "split": "train", "seed": 10, "path": "tasks/life-table/life-table-life-table-d3-t0010", "title": "Abridged life table, 19 age groups", "checks": 17, "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2016 population by age group and sex. `deaths.csv` gives the deaths in 2015, 2016 and 2017 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d3-t0011", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "split": "train", "seed": 11, "path": "tasks/life-table/life-table-standardisation-d3-t0011", "title": "Standardised death rates, 5 regions", "checks": 27, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2021 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `cancer` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Eskwater (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d1-t0012", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "split": "train", "seed": 12, "path": "tasks/life-table/life-table-age-structure-d1-t0012", "title": "Age structure, 1 area(s)", "checks": 8, "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Farrowby at the end of 2020 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d1-t0013", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "split": "train", "seed": 13, "path": "tasks/life-table/life-table-fertility-d1-t0013", "title": "Fertility measures, 1 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Glenrath in 2004 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d1-t0014", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "split": "train", "seed": 14, "path": "tasks/life-table/life-table-life-table-d1-t0014", "title": "Abridged life table, 8 age groups", "checks": 26, "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2016 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d1-t0015", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "split": "train", "seed": 15, "path": "tasks/life-table/life-table-standardisation-d1-t0015", "title": "Standardised death rates, 3 regions", "checks": 15, "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2022 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Farrowby (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d2-t0016", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "split": "train", "seed": 16, "path": "tasks/life-table/life-table-age-structure-d2-t0016", "title": "Age structure, 1 area(s)", "checks": 10, "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Eskwater at the end of 2024 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d2-t0017", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "split": "train", "seed": 17, "path": "tasks/life-table/life-table-fertility-d2-t0017", "title": "Fertility measures, 4 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2011 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d2-t0018", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "split": "train", "seed": 18, "path": "tasks/life-table/life-table-life-table-d2-t0018", "title": "Abridged life table, 19 age groups", "checks": 40, "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2011 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d2-t0019", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "split": "train", "seed": 19, "path": "tasks/life-table/life-table-standardisation-d2-t0019", "title": "Standardised death rates, 4 regions", "checks": 20, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2020 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `respiratory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Dunholt (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d3-t0020", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "split": "train", "seed": 20, "path": "tasks/life-table/life-table-age-structure-d3-t0020", "title": "Age structure, 5 area(s)", "checks": 32, "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2015 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d3-t0021", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "split": "train", "seed": 21, "path": "tasks/life-table/life-table-fertility-d3-t0021", "title": "Fertility measures, 5 area(s)", "checks": 13, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2016 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d3-t0022", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "split": "train", "seed": 22, "path": "tasks/life-table/life-table-life-table-d3-t0022", "title": "Abridged life table, 19 age groups", "checks": 17, "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2022 population by age group and sex. `deaths.csv` gives the deaths in 2021, 2022 and 2023 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d3-t0023", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "split": "train", "seed": 23, "path": "tasks/life-table/life-table-standardisation-d3-t0023", "title": "Standardised death rates, 5 regions", "checks": 27, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2014 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Calderfell (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d1-t0024", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "split": "train", "seed": 24, "path": "tasks/life-table/life-table-age-structure-d1-t0024", "title": "Age structure, 1 area(s)", "checks": 8, "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Glenrath at the end of 2016 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d1-t0025", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "split": "train", "seed": 25, "path": "tasks/life-table/life-table-fertility-d1-t0025", "title": "Fertility measures, 1 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Glenrath in 2013 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d1-t0026", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "split": "train", "seed": 26, "path": "tasks/life-table/life-table-life-table-d1-t0026", "title": "Abridged life table, 8 age groups", "checks": 26, "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2011 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d1-t0027", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "split": "train", "seed": 27, "path": "tasks/life-table/life-table-standardisation-d1-t0027", "title": "Standardised death rates, 3 regions", "checks": 15, "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2012 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Dunholt (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d2-t0028", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "split": "train", "seed": 28, "path": "tasks/life-table/life-table-age-structure-d2-t0028", "title": "Age structure, 1 area(s)", "checks": 10, "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Eskwater at the end of 2011 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d2-t0029", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "split": "train", "seed": 29, "path": "tasks/life-table/life-table-fertility-d2-t0029", "title": "Fertility measures, 4 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2013 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d2-t0030", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "split": "train", "seed": 30, "path": "tasks/life-table/life-table-life-table-d2-t0030", "title": "Abridged life table, 19 age groups", "checks": 40, "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2016 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d2-t0031", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "split": "train", "seed": 31, "path": "tasks/life-table/life-table-standardisation-d2-t0031", "title": "Standardised death rates, 4 regions", "checks": 20, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2009 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Hollinside (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d3-t0032", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "split": "train", "seed": 32, "path": "tasks/life-table/life-table-age-structure-d3-t0032", "title": "Age structure, 5 area(s)", "checks": 32, "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2023 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d3-t0033", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "split": "train", "seed": 33, "path": "tasks/life-table/life-table-fertility-d3-t0033", "title": "Fertility measures, 5 area(s)", "checks": 13, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2010 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d3-t0034", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "split": "train", "seed": 34, "path": "tasks/life-table/life-table-life-table-d3-t0034", "title": "Abridged life table, 19 age groups", "checks": 17, "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2015 population by age group and sex. `deaths.csv` gives the deaths in 2014, 2015 and 2016 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d3-t0035", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "split": "train", "seed": 35, "path": "tasks/life-table/life-table-standardisation-d3-t0035", "title": "Standardised death rates, 5 regions", "checks": 27, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2008 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `cancer` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Glenrath (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d1-t0036", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "split": "train", "seed": 36, "path": "tasks/life-table/life-table-age-structure-d1-t0036", "title": "Age structure, 1 area(s)", "checks": 8, "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Aldermark at the end of 2021 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d1-t0037", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "split": "train", "seed": 37, "path": "tasks/life-table/life-table-fertility-d1-t0037", "title": "Fertility measures, 1 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Glenrath in 2017 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d1-t0038", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "split": "train", "seed": 38, "path": "tasks/life-table/life-table-life-table-d1-t0038", "title": "Abridged life table, 8 age groups", "checks": 26, "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2010 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d1-t0039", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "split": "train", "seed": 39, "path": "tasks/life-table/life-table-standardisation-d1-t0039", "title": "Standardised death rates, 3 regions", "checks": 15, "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2017 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Farrowby (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d2-t0040", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "split": "train", "seed": 40, "path": "tasks/life-table/life-table-age-structure-d2-t0040", "title": "Age structure, 1 area(s)", "checks": 10, "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Hollinside at the end of 2016 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d2-t0041", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "split": "train", "seed": 41, "path": "tasks/life-table/life-table-fertility-d2-t0041", "title": "Fertility measures, 4 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2009 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d2-t0042", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "split": "train", "seed": 42, "path": "tasks/life-table/life-table-life-table-d2-t0042", "title": "Abridged life table, 19 age groups", "checks": 40, "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2009 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d2-t0043", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "split": "train", "seed": 43, "path": "tasks/life-table/life-table-standardisation-d2-t0043", "title": "Standardised death rates, 4 regions", "checks": 20, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2011 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Glenrath (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d3-t0044", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "split": "train", "seed": 44, "path": "tasks/life-table/life-table-age-structure-d3-t0044", "title": "Age structure, 5 area(s)", "checks": 32, "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2022 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d3-t0045", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "split": "train", "seed": 45, "path": "tasks/life-table/life-table-fertility-d3-t0045", "title": "Fertility measures, 5 area(s)", "checks": 13, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2022 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d3-t0046", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "split": "train", "seed": 46, "path": "tasks/life-table/life-table-life-table-d3-t0046", "title": "Abridged life table, 19 age groups", "checks": 17, "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2007 population by age group and sex. `deaths.csv` gives the deaths in 2006, 2007 and 2008 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d3-t0047", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "split": "train", "seed": 47, "path": "tasks/life-table/life-table-standardisation-d3-t0047", "title": "Standardised death rates, 5 regions", "checks": 27, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2018 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `respiratory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Brinmoor (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d1-t0048", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "split": "train", "seed": 48, "path": "tasks/life-table/life-table-age-structure-d1-t0048", "title": "Age structure, 1 area(s)", "checks": 8, "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Dunholt at the end of 2013 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d1-t0049", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "split": "train", "seed": 49, "path": "tasks/life-table/life-table-fertility-d1-t0049", "title": "Fertility measures, 1 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Hollinside in 2021 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d1-t0050", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "split": "train", "seed": 50, "path": "tasks/life-table/life-table-life-table-d1-t0050", "title": "Abridged life table, 8 age groups", "checks": 26, "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2005 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d1-t0051", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "split": "train", "seed": 51, "path": "tasks/life-table/life-table-standardisation-d1-t0051", "title": "Standardised death rates, 3 regions", "checks": 15, "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2021 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Farrowby (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d2-t0052", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "split": "train", "seed": 52, "path": "tasks/life-table/life-table-age-structure-d2-t0052", "title": "Age structure, 1 area(s)", "checks": 10, "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Brinmoor at the end of 2014 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d2-t0053", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "split": "train", "seed": 53, "path": "tasks/life-table/life-table-fertility-d2-t0053", "title": "Fertility measures, 4 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2018 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d2-t0054", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "split": "train", "seed": 54, "path": "tasks/life-table/life-table-life-table-d2-t0054", "title": "Abridged life table, 19 age groups", "checks": 40, "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2015 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d2-t0055", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "split": "train", "seed": 55, "path": "tasks/life-table/life-table-standardisation-d2-t0055", "title": "Standardised death rates, 4 regions", "checks": 20, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2011 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Calderfell (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d3-t0056", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "split": "train", "seed": 56, "path": "tasks/life-table/life-table-age-structure-d3-t0056", "title": "Age structure, 5 area(s)", "checks": 32, "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2011 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d3-t0057", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "split": "train", "seed": 57, "path": "tasks/life-table/life-table-fertility-d3-t0057", "title": "Fertility measures, 5 area(s)", "checks": 13, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2008 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d3-t0058", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "split": "train", "seed": 58, "path": "tasks/life-table/life-table-life-table-d3-t0058", "title": "Abridged life table, 19 age groups", "checks": 17, "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2013 population by age group and sex. `deaths.csv` gives the deaths in 2012, 2013 and 2014 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d3-t0059", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "split": "train", "seed": 59, "path": "tasks/life-table/life-table-standardisation-d3-t0059", "title": "Standardised death rates, 5 regions", "checks": 27, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2022 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `cancer` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Calderfell (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d1-t0060", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "split": "train", "seed": 60, "path": "tasks/life-table/life-table-age-structure-d1-t0060", "title": "Age structure, 1 area(s)", "checks": 8, "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Glenrath at the end of 2014 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d1-t0061", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "split": "train", "seed": 61, "path": "tasks/life-table/life-table-fertility-d1-t0061", "title": "Fertility measures, 1 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Hollinside in 2022 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d1-t0062", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "split": "train", "seed": 62, "path": "tasks/life-table/life-table-life-table-d1-t0062", "title": "Abridged life table, 8 age groups", "checks": 26, "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2021 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d1-t0063", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "split": "train", "seed": 63, "path": "tasks/life-table/life-table-standardisation-d1-t0063", "title": "Standardised death rates, 3 regions", "checks": 15, "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2012 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Brinmoor (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d2-t0064", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "split": "train", "seed": 64, "path": "tasks/life-table/life-table-age-structure-d2-t0064", "title": "Age structure, 1 area(s)", "checks": 10, "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Hollinside at the end of 2016 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d2-t0065", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "split": "train", "seed": 65, "path": "tasks/life-table/life-table-fertility-d2-t0065", "title": "Fertility measures, 4 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2023 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d2-t0066", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "split": "train", "seed": 66, "path": "tasks/life-table/life-table-life-table-d2-t0066", "title": "Abridged life table, 19 age groups", "checks": 40, "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2011 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d2-t0067", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "split": "train", "seed": 67, "path": "tasks/life-table/life-table-standardisation-d2-t0067", "title": "Standardised death rates, 4 regions", "checks": 20, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2020 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `cancer` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Hollinside (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d3-t0068", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "split": "train", "seed": 68, "path": "tasks/life-table/life-table-age-structure-d3-t0068", "title": "Age structure, 5 area(s)", "checks": 32, "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2022 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d3-t0069", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "split": "train", "seed": 69, "path": "tasks/life-table/life-table-fertility-d3-t0069", "title": "Fertility measures, 5 area(s)", "checks": 13, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2017 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d3-t0070", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "split": "train", "seed": 70, "path": "tasks/life-table/life-table-life-table-d3-t0070", "title": "Abridged life table, 19 age groups", "checks": 17, "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2016 population by age group and sex. `deaths.csv` gives the deaths in 2015, 2016 and 2017 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d3-t0071", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "split": "train", "seed": 71, "path": "tasks/life-table/life-table-standardisation-d3-t0071", "title": "Standardised death rates, 5 regions", "checks": 27, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2014 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Eskwater (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d1-t0072", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "split": "train", "seed": 72, "path": "tasks/life-table/life-table-age-structure-d1-t0072", "title": "Age structure, 1 area(s)", "checks": 8, "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Eskwater at the end of 2022 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d1-t0073", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "split": "train", "seed": 73, "path": "tasks/life-table/life-table-fertility-d1-t0073", "title": "Fertility measures, 1 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Hollinside in 2011 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d1-t0074", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "split": "train", "seed": 74, "path": "tasks/life-table/life-table-life-table-d1-t0074", "title": "Abridged life table, 8 age groups", "checks": 26, "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2006 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d1-t0075", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "split": "train", "seed": 75, "path": "tasks/life-table/life-table-standardisation-d1-t0075", "title": "Standardised death rates, 3 regions", "checks": 15, "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2022 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Hollinside (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d2-t0076", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "split": "train", "seed": 76, "path": "tasks/life-table/life-table-age-structure-d2-t0076", "title": "Age structure, 1 area(s)", "checks": 10, "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Farrowby at the end of 2018 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d2-t0077", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "split": "train", "seed": 77, "path": "tasks/life-table/life-table-fertility-d2-t0077", "title": "Fertility measures, 4 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2007 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d2-t0078", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "split": "train", "seed": 78, "path": "tasks/life-table/life-table-life-table-d2-t0078", "title": "Abridged life table, 19 age groups", "checks": 40, "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2007 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d2-t0079", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "split": "train", "seed": 79, "path": "tasks/life-table/life-table-standardisation-d2-t0079", "title": "Standardised death rates, 4 regions", "checks": 20, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2011 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `cancer` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Brinmoor (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d3-t0080", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "split": "train", "seed": 80, "path": "tasks/life-table/life-table-age-structure-d3-t0080", "title": "Age structure, 5 area(s)", "checks": 32, "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2020 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d3-t0081", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "split": "train", "seed": 81, "path": "tasks/life-table/life-table-fertility-d3-t0081", "title": "Fertility measures, 5 area(s)", "checks": 13, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2015 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d3-t0082", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "split": "train", "seed": 82, "path": "tasks/life-table/life-table-life-table-d3-t0082", "title": "Abridged life table, 19 age groups", "checks": 17, "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2017 population by age group and sex. `deaths.csv` gives the deaths in 2016, 2017 and 2018 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d3-t0083", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "split": "train", "seed": 83, "path": "tasks/life-table/life-table-standardisation-d3-t0083", "title": "Standardised death rates, 5 regions", "checks": 27, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2008 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `external` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Hollinside (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d1-e0000", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "split": "eval", "seed": 10000, "path": "tasks/life-table/life-table-age-structure-d1-e0000", "title": "Age structure, 1 area(s)", "checks": 8, "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Aldermark at the end of 2015 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d1-e0001", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "split": "eval", "seed": 10001, "path": "tasks/life-table/life-table-fertility-d1-e0001", "title": "Fertility measures, 1 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Dunholt in 2011 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d1-e0002", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "split": "eval", "seed": 10002, "path": "tasks/life-table/life-table-life-table-d1-e0002", "title": "Abridged life table, 8 age groups", "checks": 26, "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2022 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d1-e0003", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "split": "eval", "seed": 10003, "path": "tasks/life-table/life-table-standardisation-d1-e0003", "title": "Standardised death rates, 3 regions", "checks": 15, "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2008 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Aldermark (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d2-e0004", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "split": "eval", "seed": 10004, "path": "tasks/life-table/life-table-age-structure-d2-e0004", "title": "Age structure, 1 area(s)", "checks": 10, "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Brinmoor at the end of 2020 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d2-e0005", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "split": "eval", "seed": 10005, "path": "tasks/life-table/life-table-fertility-d2-e0005", "title": "Fertility measures, 4 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2004 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d2-e0006", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "split": "eval", "seed": 10006, "path": "tasks/life-table/life-table-life-table-d2-e0006", "title": "Abridged life table, 19 age groups", "checks": 40, "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2012 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d2-e0007", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "split": "eval", "seed": 10007, "path": "tasks/life-table/life-table-standardisation-d2-e0007", "title": "Standardised death rates, 4 regions", "checks": 20, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2018 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `cancer` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Hollinside (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d3-e0008", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "split": "eval", "seed": 10008, "path": "tasks/life-table/life-table-age-structure-d3-e0008", "title": "Age structure, 5 area(s)", "checks": 32, "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2016 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d3-e0009", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "split": "eval", "seed": 10009, "path": "tasks/life-table/life-table-fertility-d3-e0009", "title": "Fertility measures, 5 area(s)", "checks": 13, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2011 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d3-e0010", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "split": "eval", "seed": 10010, "path": "tasks/life-table/life-table-life-table-d3-e0010", "title": "Abridged life table, 19 age groups", "checks": 17, "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2016 population by age group and sex. `deaths.csv` gives the deaths in 2015, 2016 and 2017 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d3-e0011", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "split": "eval", "seed": 10011, "path": "tasks/life-table/life-table-standardisation-d3-e0011", "title": "Standardised death rates, 5 regions", "checks": 27, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2015 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Aldermark (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d1-e0012", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 1, "split": "eval", "seed": 10012, "path": "tasks/life-table/life-table-age-structure-d1-e0012", "title": "Age structure, 1 area(s)", "checks": 8, "instruction": "# Age structure: one municipality\n\n`population.csv` gives the population of Aldermark at the end of 2013 in five-year age groups. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: an integer.\n- `share_0_14_percent`, `share_15_64_percent`, `share_65_plus_percent`: each broad age group as a percentage of the total population, 2 decimals.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: per 100 people of working age, 2 decimals.\n- `ageing_index`: 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d1-e0013", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 1, "split": "eval", "seed": 10013, "path": "tasks/life-table/life-table-fertility-d1-e0013", "title": "Fertility measures, 1 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by age group in Calderfell in 2005 and `births.csv` the live births by age of mother. `registry.json` gives the share of births that were girls.\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d1-e0014", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 1, "split": "eval", "seed": 10014, "path": "tasks/life-table/life-table-life-table-d1-e0014", "title": "Abridged life table, 8 age groups", "checks": 26, "instruction": "# Life table: one population\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2020 by age group. Build the abridged period life table as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ...), one entry per age group. Each value has\n - `mx_per_1000`: the death rate per 1000 population, 3 decimals.\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e60`: life expectancy at exact age 60, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d1-e0015", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 1, "split": "eval", "seed": 10015, "path": "tasks/life-table/life-table-standardisation-d1-e0015", "title": "Standardised death rates, 3 regions", "checks": 15, "instruction": "# Age-standardised death rates\n\n`regions.csv` gives the mid-year population and the deaths in 2015 by region and age group, in no particular order. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Farrowby (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d2-e0016", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 2, "split": "eval", "seed": 10016, "path": "tasks/life-table/life-table-age-structure-d2-e0016", "title": "Age structure, 1 area(s)", "checks": 10, "instruction": "# Age structure: one municipality by sex\n\n`population.csv` gives the population of Glenrath at the end of 2011 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_population`: both sexes, an integer.\n- `young_dependency_ratio`, `old_dependency_ratio`, `total_dependency_ratio`: both sexes together, per 100 people of working age, 2 decimals.\n- `ageing_index`: both sexes together, 2 decimals.\n- `sex_ratio`: males per 100 females in the whole population, 2 decimals.\n- `sex_ratio_65_plus`: males per 100 females among people aged 65 and over, 2 decimals.\n- `median_age`: median age of the whole population in years, 2 decimals.\n- `median_age_female`, `median_age_male`: median age of each sex, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d2-e0017", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 2, "split": "eval", "seed": 10017, "path": "tasks/life-table/life-table-fertility-d2-e0017", "title": "Fertility measures, 4 area(s)", "checks": 12, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2007 and `births.csv` the live births by municipality and age of mother, both in no particular order. `registry.json` gives the sex ratio at birth. A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 4 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d2-e0018", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 2, "split": "eval", "seed": 10018, "path": "tasks/life-table/life-table-life-table-d2-e0018", "title": "Abridged life table, 19 age groups", "checks": 40, "instruction": "# Life table: both sexes combined\n\n`population_deaths.csv` gives the mid-year population and the deaths in 2014 by age group and sex, in no particular order. Build one abridged period life table for **both sexes combined** (add the two sexes' populations and deaths in each age group first), as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `table`: object keyed by the starting age of each interval as a string (`\"0\"`, `\"1\"`, `\"5\"`, ..., `\"85\"`), one entry per age group. Each value has\n - `qx`: the probability of dying in the interval, 6 decimals.\n - `lx`: survivors at the start of the interval out of 100000, to the nearest whole number.\n- `e0`: life expectancy at birth in years, 2 decimals.\n- `e65`: life expectancy at exact age 65, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d2-e0019", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 2, "split": "eval", "seed": 10019, "path": "tasks/life-table/life-table-standardisation-d2-e0019", "title": "Standardised death rates, 4 regions", "checks": 20, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2016 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `respiratory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Eskwater (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-age-structure-d3-e0020", "env": "life-table", "isced_f": "0314", "family": "age-structure", "difficulty": 3, "split": "eval", "seed": 10020, "path": "tasks/life-table/life-table-age-structure-d3-e0020", "title": "Age structure, 5 area(s)", "checks": 32, "instruction": "# Age structure: a county and its municipalities\n\n`population.csv` gives the population of the 5 municipalities of a county at the end of 2012 by five-year age group and sex, in no particular order. `methods.md` gives the definitions to use. All indicators are for both sexes together.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `areas`: object keyed by municipality. Each value has\n - `population`: an integer.\n - `young_dependency_ratio` and `old_dependency_ratio`: per 100 people of working age, 2 decimals.\n - `ageing_index`: 2 decimals.\n - `median_age`: in years, 2 decimals.\n- `county`: the same five keys for the county as a whole (all municipalities together).\n- `oldest_area`: the municipality with the highest median age.\n- `above_county_old_dependency`: list of the municipalities whose old-age dependency ratio is higher than the county's (any order).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-fertility-d3-e0021", "env": "life-table", "isced_f": "0314", "family": "fertility", "difficulty": 3, "split": "eval", "seed": 10021, "path": "tasks/life-table/life-table-fertility-d3-e0021", "title": "Fertility measures, 5 area(s)", "checks": 13, "instruction": "# Fertility measures\n\n`women.csv` gives the mid-year number of women by municipality and age group in 2012 and `births.csv` the live births by municipality, age of mother and sex of the child, both in no particular order. `female_life_table.csv` gives the person-years column of the female life table (radix 100000). A combination with no row in `births.csv` had no births. Compute the measures for the county as a whole (all 5 municipalities together).\n\n`methods.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `total_births`: all live births, an integer.\n- `asfr_per_1000`: object keyed by age group (`15-19`, `20-24`, ..., `45-49`): the age-specific fertility rate per 1000 women, 2 decimals.\n- `peak_age_group`: the age group with the highest rate.\n- `tfr`: the total fertility rate in children per woman, 3 decimals.\n- `grr`: the gross reproduction rate, 3 decimals.\n- `mean_age_at_childbearing`: in years, 2 decimals.\n- `nrr`: the net reproduction rate, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-life-table-d3-e0022", "env": "life-table", "isced_f": "0314", "family": "life-table", "difficulty": 3, "split": "eval", "seed": 10022, "path": "tasks/life-table/life-table-life-table-d3-e0022", "title": "Abridged life table, 19 age groups", "checks": 17, "instruction": "# Life table: women and men\n\n`population.csv` gives the mid-2019 population by age group and sex. `deaths.csv` gives the deaths in 2018, 2019 and 2020 by age group and sex. Both are in no particular order. Build a separate abridged period life table for each sex as described in `methods.md`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `female` and `male`: for each sex an object with\n - `q0`: the probability of dying before exact age 1, 6 decimals.\n - `l15`, `l60`, `l65`: survivors at exact ages 15, 60 and 65 out of 100000, to the nearest whole number.\n - `q15_60`: the probability that a person alive at exact age 15 dies before exact age 60, that is 1 - l60 / l15, 5 decimals.\n - `e0`, `e15`, `e65`: life expectancy at exact ages 0, 15 and 65 in years, 2 decimals.\n- `e0_gap`: female life expectancy at birth minus male life expectancy at birth, in years, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "life-table-standardisation-d3-e0023", "env": "life-table", "isced_f": "0314", "family": "standardisation", "difficulty": 3, "split": "eval", "seed": 10023, "path": "tasks/life-table/life-table-standardisation-d3-e0023", "title": "Standardised death rates, 5 regions", "checks": 27, "instruction": "# Age-standardised death rates\n\n`population.csv` gives the mid-year population in 2016 by region, age group and sex, and `deaths.csv` the deaths by region, age group, sex and cause of death, both in no particular order. The study is about deaths from the cause `circulatory` only, for both sexes together: ignore the other causes and add the two sexes. A combination with no row in `deaths.csv` had no deaths. `standard_population.csv` gives the standard population and `methods.md` the definitions. The reference region is Glenrath (also in `study.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `regions`: object keyed by region. Each value has\n - `population`: the region's whole population, an integer.\n - `deaths`: the deaths counted in the study, an integer.\n - `crude_rate`: crude death rate per 100000, 1 decimal.\n - `standardised_rate`: directly age-standardised death rate per 100000, 1 decimal.\n - `srr`: standardised rate ratio against the reference region, 3 decimals.\n- `ranking`: list of all regions from the highest standardised rate to the lowest.\n- `reversed`: list of the regions that compare differently with the reference region before and after standardisation: the crude rate is higher than the reference region's while the standardised rate is lower, or the other way round (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d1-t0000", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "split": "train", "seed": 0, "path": "tasks/means-test/means-test-change-d1-t0000", "title": "Prorate 3 cases with a change during the month", "checks": 11, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-07 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d1-t0001", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "split": "train", "seed": 1, "path": "tasks/means-test/means-test-entitlement-d1-t0001", "title": "Assess 4 households", "checks": 17, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d1-t0002", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "split": "train", "seed": 2, "path": "tasks/means-test/means-test-overpayment-d1-t0002", "title": "Work out overpayments for 3 cases", "checks": 18, "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d1-t0003", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "split": "train", "seed": 3, "path": "tasks/means-test/means-test-review-d1-t0003", "title": "Review 5 benefit decisions", "checks": 11, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d2-t0004", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "split": "train", "seed": 4, "path": "tasks/means-test/means-test-change-d2-t0004", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-10 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d2-t0005", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "split": "train", "seed": 5, "path": "tasks/means-test/means-test-entitlement-d2-t0005", "title": "Assess 6 households", "checks": 31, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d2-t0006", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "split": "train", "seed": 6, "path": "tasks/means-test/means-test-overpayment-d2-t0006", "title": "Work out overpayments for 4 cases", "checks": 26, "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d2-t0007", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "split": "train", "seed": 7, "path": "tasks/means-test/means-test-review-d2-t0007", "title": "Review 7 benefit decisions", "checks": 19, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d3-t0008", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "split": "train", "seed": 8, "path": "tasks/means-test/means-test-change-d3-t0008", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-09 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d3-t0009", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "split": "train", "seed": 9, "path": "tasks/means-test/means-test-entitlement-d3-t0009", "title": "Assess 7 households", "checks": 37, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d3-t0010", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "split": "train", "seed": 10, "path": "tasks/means-test/means-test-overpayment-d3-t0010", "title": "Work out overpayments for 5 cases", "checks": 34, "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d3-t0011", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "split": "train", "seed": 11, "path": "tasks/means-test/means-test-review-d3-t0011", "title": "Review 9 benefit decisions", "checks": 27, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d1-t0012", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "split": "train", "seed": 12, "path": "tasks/means-test/means-test-change-d1-t0012", "title": "Prorate 3 cases with a change during the month", "checks": 11, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-06 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d1-t0013", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "split": "train", "seed": 13, "path": "tasks/means-test/means-test-entitlement-d1-t0013", "title": "Assess 4 households", "checks": 17, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d1-t0014", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "split": "train", "seed": 14, "path": "tasks/means-test/means-test-overpayment-d1-t0014", "title": "Work out overpayments for 3 cases", "checks": 18, "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d1-t0015", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "split": "train", "seed": 15, "path": "tasks/means-test/means-test-review-d1-t0015", "title": "Review 5 benefit decisions", "checks": 11, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d2-t0016", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "split": "train", "seed": 16, "path": "tasks/means-test/means-test-change-d2-t0016", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-02 (28 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d2-t0017", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "split": "train", "seed": 17, "path": "tasks/means-test/means-test-entitlement-d2-t0017", "title": "Assess 6 households", "checks": 31, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d2-t0018", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "split": "train", "seed": 18, "path": "tasks/means-test/means-test-overpayment-d2-t0018", "title": "Work out overpayments for 4 cases", "checks": 28, "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d2-t0019", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "split": "train", "seed": 19, "path": "tasks/means-test/means-test-review-d2-t0019", "title": "Review 7 benefit decisions", "checks": 19, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d3-t0020", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "split": "train", "seed": 20, "path": "tasks/means-test/means-test-change-d3-t0020", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-04 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d3-t0021", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "split": "train", "seed": 21, "path": "tasks/means-test/means-test-entitlement-d3-t0021", "title": "Assess 7 households", "checks": 37, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d3-t0022", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "split": "train", "seed": 22, "path": "tasks/means-test/means-test-overpayment-d3-t0022", "title": "Work out overpayments for 5 cases", "checks": 33, "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d3-t0023", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "split": "train", "seed": 23, "path": "tasks/means-test/means-test-review-d3-t0023", "title": "Review 9 benefit decisions", "checks": 27, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d1-t0024", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "split": "train", "seed": 24, "path": "tasks/means-test/means-test-change-d1-t0024", "title": "Prorate 3 cases with a change during the month", "checks": 11, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-07 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d1-t0025", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "split": "train", "seed": 25, "path": "tasks/means-test/means-test-entitlement-d1-t0025", "title": "Assess 4 households", "checks": 17, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d1-t0026", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "split": "train", "seed": 26, "path": "tasks/means-test/means-test-overpayment-d1-t0026", "title": "Work out overpayments for 3 cases", "checks": 18, "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d1-t0027", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "split": "train", "seed": 27, "path": "tasks/means-test/means-test-review-d1-t0027", "title": "Review 5 benefit decisions", "checks": 11, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d2-t0028", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "split": "train", "seed": 28, "path": "tasks/means-test/means-test-change-d2-t0028", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-06 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d2-t0029", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "split": "train", "seed": 29, "path": "tasks/means-test/means-test-entitlement-d2-t0029", "title": "Assess 6 households", "checks": 31, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d2-t0030", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "split": "train", "seed": 30, "path": "tasks/means-test/means-test-overpayment-d2-t0030", "title": "Work out overpayments for 4 cases", "checks": 27, "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d2-t0031", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "split": "train", "seed": 31, "path": "tasks/means-test/means-test-review-d2-t0031", "title": "Review 7 benefit decisions", "checks": 19, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d3-t0032", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "split": "train", "seed": 32, "path": "tasks/means-test/means-test-change-d3-t0032", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-05 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d3-t0033", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "split": "train", "seed": 33, "path": "tasks/means-test/means-test-entitlement-d3-t0033", "title": "Assess 7 households", "checks": 37, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d3-t0034", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "split": "train", "seed": 34, "path": "tasks/means-test/means-test-overpayment-d3-t0034", "title": "Work out overpayments for 5 cases", "checks": 33, "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d3-t0035", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "split": "train", "seed": 35, "path": "tasks/means-test/means-test-review-d3-t0035", "title": "Review 9 benefit decisions", "checks": 27, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d1-t0036", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "split": "train", "seed": 36, "path": "tasks/means-test/means-test-change-d1-t0036", "title": "Prorate 3 cases with a change during the month", "checks": 11, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-01 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d1-t0037", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "split": "train", "seed": 37, "path": "tasks/means-test/means-test-entitlement-d1-t0037", "title": "Assess 4 households", "checks": 17, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d1-t0038", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "split": "train", "seed": 38, "path": "tasks/means-test/means-test-overpayment-d1-t0038", "title": "Work out overpayments for 3 cases", "checks": 18, "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d1-t0039", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "split": "train", "seed": 39, "path": "tasks/means-test/means-test-review-d1-t0039", "title": "Review 5 benefit decisions", "checks": 11, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d2-t0040", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "split": "train", "seed": 40, "path": "tasks/means-test/means-test-change-d2-t0040", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-10 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d2-t0041", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "split": "train", "seed": 41, "path": "tasks/means-test/means-test-entitlement-d2-t0041", "title": "Assess 6 households", "checks": 31, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d2-t0042", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "split": "train", "seed": 42, "path": "tasks/means-test/means-test-overpayment-d2-t0042", "title": "Work out overpayments for 4 cases", "checks": 25, "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d2-t0043", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "split": "train", "seed": 43, "path": "tasks/means-test/means-test-review-d2-t0043", "title": "Review 7 benefit decisions", "checks": 19, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d3-t0044", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "split": "train", "seed": 44, "path": "tasks/means-test/means-test-change-d3-t0044", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-05 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d3-t0045", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "split": "train", "seed": 45, "path": "tasks/means-test/means-test-entitlement-d3-t0045", "title": "Assess 7 households", "checks": 37, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d3-t0046", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "split": "train", "seed": 46, "path": "tasks/means-test/means-test-overpayment-d3-t0046", "title": "Work out overpayments for 5 cases", "checks": 34, "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d3-t0047", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "split": "train", "seed": 47, "path": "tasks/means-test/means-test-review-d3-t0047", "title": "Review 9 benefit decisions", "checks": 27, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d1-t0048", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "split": "train", "seed": 48, "path": "tasks/means-test/means-test-change-d1-t0048", "title": "Prorate 3 cases with a change during the month", "checks": 11, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-02 (28 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d1-t0049", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "split": "train", "seed": 49, "path": "tasks/means-test/means-test-entitlement-d1-t0049", "title": "Assess 4 households", "checks": 17, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d1-t0050", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "split": "train", "seed": 50, "path": "tasks/means-test/means-test-overpayment-d1-t0050", "title": "Work out overpayments for 3 cases", "checks": 18, "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d1-t0051", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "split": "train", "seed": 51, "path": "tasks/means-test/means-test-review-d1-t0051", "title": "Review 5 benefit decisions", "checks": 11, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d2-t0052", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "split": "train", "seed": 52, "path": "tasks/means-test/means-test-change-d2-t0052", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-04 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d2-t0053", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "split": "train", "seed": 53, "path": "tasks/means-test/means-test-entitlement-d2-t0053", "title": "Assess 6 households", "checks": 31, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d2-t0054", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "split": "train", "seed": 54, "path": "tasks/means-test/means-test-overpayment-d2-t0054", "title": "Work out overpayments for 4 cases", "checks": 25, "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d2-t0055", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "split": "train", "seed": 55, "path": "tasks/means-test/means-test-review-d2-t0055", "title": "Review 7 benefit decisions", "checks": 19, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d3-t0056", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "split": "train", "seed": 56, "path": "tasks/means-test/means-test-change-d3-t0056", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-09 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d3-t0057", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "split": "train", "seed": 57, "path": "tasks/means-test/means-test-entitlement-d3-t0057", "title": "Assess 7 households", "checks": 37, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d3-t0058", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "split": "train", "seed": 58, "path": "tasks/means-test/means-test-overpayment-d3-t0058", "title": "Work out overpayments for 5 cases", "checks": 34, "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d3-t0059", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "split": "train", "seed": 59, "path": "tasks/means-test/means-test-review-d3-t0059", "title": "Review 9 benefit decisions", "checks": 27, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d1-t0060", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "split": "train", "seed": 60, "path": "tasks/means-test/means-test-change-d1-t0060", "title": "Prorate 3 cases with a change during the month", "checks": 11, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-07 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d1-t0061", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "split": "train", "seed": 61, "path": "tasks/means-test/means-test-entitlement-d1-t0061", "title": "Assess 4 households", "checks": 17, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d1-t0062", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "split": "train", "seed": 62, "path": "tasks/means-test/means-test-overpayment-d1-t0062", "title": "Work out overpayments for 3 cases", "checks": 18, "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d1-t0063", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "split": "train", "seed": 63, "path": "tasks/means-test/means-test-review-d1-t0063", "title": "Review 5 benefit decisions", "checks": 11, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d2-t0064", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "split": "train", "seed": 64, "path": "tasks/means-test/means-test-change-d2-t0064", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-04 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d2-t0065", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "split": "train", "seed": 65, "path": "tasks/means-test/means-test-entitlement-d2-t0065", "title": "Assess 6 households", "checks": 31, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d2-t0066", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "split": "train", "seed": 66, "path": "tasks/means-test/means-test-overpayment-d2-t0066", "title": "Work out overpayments for 4 cases", "checks": 26, "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d2-t0067", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "split": "train", "seed": 67, "path": "tasks/means-test/means-test-review-d2-t0067", "title": "Review 7 benefit decisions", "checks": 19, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d3-t0068", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "split": "train", "seed": 68, "path": "tasks/means-test/means-test-change-d3-t0068", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-02 (28 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d3-t0069", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "split": "train", "seed": 69, "path": "tasks/means-test/means-test-entitlement-d3-t0069", "title": "Assess 7 households", "checks": 37, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d3-t0070", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "split": "train", "seed": 70, "path": "tasks/means-test/means-test-overpayment-d3-t0070", "title": "Work out overpayments for 5 cases", "checks": 32, "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d3-t0071", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "split": "train", "seed": 71, "path": "tasks/means-test/means-test-review-d3-t0071", "title": "Review 9 benefit decisions", "checks": 27, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d1-t0072", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "split": "train", "seed": 72, "path": "tasks/means-test/means-test-change-d1-t0072", "title": "Prorate 3 cases with a change during the month", "checks": 11, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-05 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d1-t0073", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "split": "train", "seed": 73, "path": "tasks/means-test/means-test-entitlement-d1-t0073", "title": "Assess 4 households", "checks": 17, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d1-t0074", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "split": "train", "seed": 74, "path": "tasks/means-test/means-test-overpayment-d1-t0074", "title": "Work out overpayments for 3 cases", "checks": 18, "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d1-t0075", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "split": "train", "seed": 75, "path": "tasks/means-test/means-test-review-d1-t0075", "title": "Review 5 benefit decisions", "checks": 11, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d2-t0076", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "split": "train", "seed": 76, "path": "tasks/means-test/means-test-change-d2-t0076", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-06 (30 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d2-t0077", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "split": "train", "seed": 77, "path": "tasks/means-test/means-test-entitlement-d2-t0077", "title": "Assess 6 households", "checks": 31, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d2-t0078", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "split": "train", "seed": 78, "path": "tasks/means-test/means-test-overpayment-d2-t0078", "title": "Work out overpayments for 4 cases", "checks": 27, "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d2-t0079", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "split": "train", "seed": 79, "path": "tasks/means-test/means-test-review-d2-t0079", "title": "Review 7 benefit decisions", "checks": 19, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d3-t0080", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "split": "train", "seed": 80, "path": "tasks/means-test/means-test-change-d3-t0080", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-08 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d3-t0081", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "split": "train", "seed": 81, "path": "tasks/means-test/means-test-entitlement-d3-t0081", "title": "Assess 7 households", "checks": 37, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d3-t0082", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "split": "train", "seed": 82, "path": "tasks/means-test/means-test-overpayment-d3-t0082", "title": "Work out overpayments for 5 cases", "checks": 34, "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d3-t0083", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "split": "train", "seed": 83, "path": "tasks/means-test/means-test-review-d3-t0083", "title": "Review 9 benefit decisions", "checks": 27, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d1-e0000", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "split": "eval", "seed": 10000, "path": "tasks/means-test/means-test-change-d1-e0000", "title": "Prorate 3 cases with a change during the month", "checks": 11, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-03 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d1-e0001", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "split": "eval", "seed": 10001, "path": "tasks/means-test/means-test-entitlement-d1-e0001", "title": "Assess 4 households", "checks": 17, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d1-e0002", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "split": "eval", "seed": 10002, "path": "tasks/means-test/means-test-overpayment-d1-e0002", "title": "Work out overpayments for 3 cases", "checks": 18, "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d1-e0003", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "split": "eval", "seed": 10003, "path": "tasks/means-test/means-test-review-d1-e0003", "title": "Review 5 benefit decisions", "checks": 11, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d2-e0004", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "split": "eval", "seed": 10004, "path": "tasks/means-test/means-test-change-d2-e0004", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-05 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d2-e0005", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "split": "eval", "seed": 10005, "path": "tasks/means-test/means-test-entitlement-d2-e0005", "title": "Assess 6 households", "checks": 31, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d2-e0006", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "split": "eval", "seed": 10006, "path": "tasks/means-test/means-test-overpayment-d2-e0006", "title": "Work out overpayments for 4 cases", "checks": 27, "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d2-e0007", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "split": "eval", "seed": 10007, "path": "tasks/means-test/means-test-review-d2-e0007", "title": "Review 7 benefit decisions", "checks": 19, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d3-e0008", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "split": "eval", "seed": 10008, "path": "tasks/means-test/means-test-change-d3-e0008", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-10 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d3-e0009", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "split": "eval", "seed": 10009, "path": "tasks/means-test/means-test-entitlement-d3-e0009", "title": "Assess 7 households", "checks": 37, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d3-e0010", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "split": "eval", "seed": 10010, "path": "tasks/means-test/means-test-overpayment-d3-e0010", "title": "Work out overpayments for 5 cases", "checks": 33, "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d3-e0011", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "split": "eval", "seed": 10011, "path": "tasks/means-test/means-test-review-d3-e0011", "title": "Review 9 benefit decisions", "checks": 27, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d1-e0012", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 1, "split": "eval", "seed": 10012, "path": "tasks/means-test/means-test-change-d1-e0012", "title": "Prorate 3 cases with a change during the month", "checks": 11, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark for 2026-05 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d1-e0013", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 1, "split": "eval", "seed": 10013, "path": "tasks/means-test/means-test-entitlement-d1-e0013", "title": "Assess 4 households", "checks": 17, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 4 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d1-e0014", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 1, "split": "eval", "seed": 10014, "path": "tasks/means-test/means-test-overpayment-d1-e0014", "title": "Work out overpayments for 3 cases", "checks": 18, "instruction": "# Means test: overpayments\n\n`cases.json` holds 3 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d1-e0015", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 1, "split": "eval", "seed": 10015, "path": "tasks/means-test/means-test-review-d1-e0015", "title": "Review 5 benefit decisions", "checks": 11, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 5 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d2-e0016", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 2, "split": "eval", "seed": 10016, "path": "tasks/means-test/means-test-change-d2-e0016", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-03 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d2-e0017", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 2, "split": "eval", "seed": 10017, "path": "tasks/means-test/means-test-entitlement-d2-e0017", "title": "Assess 6 households", "checks": 31, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 6 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d2-e0018", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 2, "split": "eval", "seed": 10018, "path": "tasks/means-test/means-test-overpayment-d2-e0018", "title": "Work out overpayments for 4 cases", "checks": 27, "instruction": "# Means test: overpayments\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d2-e0019", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 2, "split": "eval", "seed": 10019, "path": "tasks/means-test/means-test-review-d2-e0019", "title": "Review 7 benefit decisions", "checks": 19, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 7 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-change-d3-e0020", "env": "means-test", "isced_f": "0923", "family": "change", "difficulty": 3, "split": "eval", "seed": 10020, "path": "tasks/means-test/means-test-change-d3-e0020", "title": "Prorate 4 cases with a change during the month", "checks": 14, "instruction": "# Means test: a change during the month\n\n`cases.json` holds 4 household case files from the Municipality of Eskermark for 2026-03 (31 days). Each file shows the household as it was on the first day of the month and a list of `changes`, each with the date it takes effect (not always listed in date order). Some files have a `claim_date`: see section 7. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 7 says how to handle a change during the month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `rent_change`: the monthly rent becomes the amount given.\n- `member_joins`: the person given moves in, with the role shown.\n- `member_leaves`: the named person moves out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `days`: a list of integers, the number of days in each period, in date order.\n - `rates`: a list of numbers, the monthly entitlement (section 6) of each period, in the same order, fl with 2 decimals.\n - `payable`: the benefit payable for the month, fl with 2 decimals.\n- `nothing_payable`: list of the case ids for which nothing is payable for the month (any order; an empty list if none).\n- `total_payable`: the sum of `payable` over all the cases, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-entitlement-d3-e0021", "env": "means-test", "isced_f": "0923", "family": "entitlement", "difficulty": 3, "split": "eval", "seed": 10021, "path": "tasks/means-test/means-test-entitlement-d3-e0021", "title": "Assess 7 households", "checks": 37, "instruction": "# Means test: monthly entitlement\n\n`cases.json` holds the case files of 7 households that have applied for local support in the Municipality of Eskermark. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changes during the month.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: an object keyed by case id. Each value has, in fl with 2 decimals,\n - `norm`: the norm (section 2).\n - `countable_income`: the countable income (section 4).\n - `housing_allowance`: the housing allowance (section 3).\n - `asset_excess`: the asset excess (section 5), 0 if there is none.\n - `benefit`: the benefit payable for the month (section 6), 0 if there is no entitlement.\n- `no_entitlement`: list of the case ids of the households with no entitlement (any order; an empty list if none).\n- `total_payable`: the sum of the benefits payable to all the households, fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-overpayment-d3-e0022", "env": "means-test", "isced_f": "0923", "family": "overpayment", "difficulty": 3, "split": "eval", "seed": 10022, "path": "tasks/means-test/means-test-overpayment-d3-e0022", "title": "Work out overpayments for 5 cases", "checks": 31, "instruction": "# Means test: overpayments\n\n`cases.json` holds 5 household case files from the Municipality of Eskermark. Each shows the household as it was declared, the benefit paid for each month under review (`benefit_paid`), and a `discovered_change`: a change that in fact took effect on the date given but was only found out afterwards. From that date on, the true circumstances are the declared ones with the change applied. `regulation.md` is the ordinance to apply (it is fictional; use its rules and amounts exactly). Section 8 covers overpayments and recovery, and section 7 a change that falls inside a month.\n\nThe kinds of change are:\n\n- `income_change`: the named person's whole income list is replaced by the list given.\n- `member_joins`: the person given moved in, with the role shown.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `cases`: an object keyed by case id. Each value has\n - `correct`: an object keyed by month (for example `2026-03`), giving the correct benefit for each month under review, fl with 2 decimals.\n - `total_overpayment`: the total overpayment, fl with 2 decimals (0 if there is none).\n - `deductions`: the number of monthly deductions needed to recover it, an integer (0 if nothing is recovered).\n - `last_deduction`: the amount of the last deduction, fl with 2 decimals. Leave it out if nothing is recovered.\n- `written_off`: list of the case ids whose overpayment is above 0 but is written off (any order; an empty list if none).\n- `total_to_recover`: the sum of the total overpayments that will be recovered (leave out those written off), fl with 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "means-test-review-d3-e0023", "env": "means-test", "isced_f": "0923", "family": "review", "difficulty": 3, "split": "eval", "seed": 10023, "path": "tasks/means-test/means-test-review-d3-e0023", "title": "Review 9 benefit decisions", "checks": 27, "instruction": "# Means test: review of decisions\n\n`decisions.json` holds 9 household case files from the Municipality of Eskermark, each with the `decision` a caseworker made for the month: the norm, the countable income, the housing allowance, the asset excess and the benefit. `regulation.md` is the ordinance (it is fictional; use its rules and amounts exactly, sections 1 to 6). Nothing changed during the month.\n\nRe-assess every household. A decision is wrong if any of its figures differs from the correct figure by more than 0.01 fl. Some of the decisions are wrong.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `wrong_decisions`: list of the case ids whose decision is wrong (any order).\n- `corrected`: an object keyed by case id, for the wrong decisions only. Each value has the correct figures, fl with 2 decimals: `norm`, `countable_income`, `housing_allowance`, `asset_excess`, `benefit`, and\n - `difference`: the correct benefit minus the benefit in the decision (negative if the household was paid too much).\n- `total_underpaid`: the sum of the positive differences, fl with 2 decimals (0 if none).\n- `total_overpaid`: the sum of the negative differences, given as a positive number, fl with 2 decimals (0 if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d1-t0000", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "split": "train", "seed": 0, "path": "tasks/price-index/price-index-basket-indices-d1-t0000", "title": "Price indices, 5 items over 3 years", "checks": 9, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2010, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2010\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d1-t0001", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "split": "train", "seed": 1, "path": "tasks/price-index/price-index-income-distribution-d1-t0001", "title": "Income distribution, 30 households", "checks": 10, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 30 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d1-t0002", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "split": "train", "seed": 2, "path": "tasks/price-index/price-index-inflation-contributions-d1-t0002", "title": "Inflation contributions, 5 categories", "checks": 9, "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2018-07 (the current month) with 2018-06 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2018-06\"` and `\"2018-07\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2018-06 to 2018-07, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d1-t0003", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "split": "train", "seed": 3, "path": "tasks/price-index/price-index-national-accounts-d1-t0003", "title": "GDP for 3 years", "checks": 13, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2019 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2019\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2019, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2019).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2019).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d2-t0004", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "split": "train", "seed": 4, "path": "tasks/price-index/price-index-basket-indices-d2-t0004", "title": "Price indices, 8 items over 4 years", "checks": 13, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2019, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2019\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d2-t0005", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "split": "train", "seed": 5, "path": "tasks/price-index/price-index-income-distribution-d2-t0005", "title": "Income distribution, 50 households", "checks": 13, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 50 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d2-t0006", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "split": "train", "seed": 6, "path": "tasks/price-index/price-index-inflation-contributions-d2-t0006", "title": "Inflation contributions, 8 categories", "checks": 13, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2018-06 (the current month) with 2017-06 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2017-06\"` and `\"2018-06\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2017-06 to 2018-06, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d2-t0007", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "split": "train", "seed": 7, "path": "tasks/price-index/price-index-national-accounts-d2-t0007", "title": "GDP for 5 years", "checks": 28, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2016 and the reference year of the chain-linked index is 2012 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2012) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2012\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2016, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2012 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2012).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2012).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d3-t0008", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "split": "train", "seed": 8, "path": "tasks/price-index/price-index-basket-indices-d3-t0008", "title": "Price indices, 10 items over 5 years", "checks": 22, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2011, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2011\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d3-t0009", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "split": "train", "seed": 9, "path": "tasks/price-index/price-index-income-distribution-d3-t0009", "title": "Income distribution, 45 households", "checks": 15, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 45 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d3-t0010", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "split": "train", "seed": 10, "path": "tasks/price-index/price-index-inflation-contributions-d3-t0010", "title": "Inflation contributions, 11 categories", "checks": 22, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2015-04, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2015-04: rebased index = 100 x published index / published index of the same category in 2015-04. Use the rebased indices everywhere below.\n\nCompare 2016-05 (the current month) with 2015-05 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2015-05\"` and `\"2016-05\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2015-05 to 2016-05, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d3-t0011", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "split": "train", "seed": 11, "path": "tasks/price-index/price-index-national-accounts-d3-t0011", "title": "GDP for 5 years", "checks": 32, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2011 and the reference year of the chain-linked index is 2010 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2010) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2010 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2009\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2011, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2010 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2010 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2011 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2009 to 2013, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d1-t0012", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "split": "train", "seed": 12, "path": "tasks/price-index/price-index-basket-indices-d1-t0012", "title": "Price indices, 5 items over 3 years", "checks": 9, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2019, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2019\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d1-t0013", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "split": "train", "seed": 13, "path": "tasks/price-index/price-index-income-distribution-d1-t0013", "title": "Income distribution, 20 households", "checks": 10, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 20 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d1-t0014", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "split": "train", "seed": 14, "path": "tasks/price-index/price-index-inflation-contributions-d1-t0014", "title": "Inflation contributions, 5 categories", "checks": 9, "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2020-01 (the current month) with 2019-12 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2019-12\"` and `\"2020-01\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2019-12 to 2020-01, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d1-t0015", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "split": "train", "seed": 15, "path": "tasks/price-index/price-index-national-accounts-d1-t0015", "title": "GDP for 3 years", "checks": 13, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2019 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2019\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2019, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2019).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2019).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d2-t0016", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "split": "train", "seed": 16, "path": "tasks/price-index/price-index-basket-indices-d2-t0016", "title": "Price indices, 8 items over 4 years", "checks": 13, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2019, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2019\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d2-t0017", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "split": "train", "seed": 17, "path": "tasks/price-index/price-index-income-distribution-d2-t0017", "title": "Income distribution, 45 households", "checks": 13, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 45 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d2-t0018", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "split": "train", "seed": 18, "path": "tasks/price-index/price-index-inflation-contributions-d2-t0018", "title": "Inflation contributions, 8 categories", "checks": 13, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2014-03 (the current month) with 2013-03 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2013-03\"` and `\"2014-03\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2013-03 to 2014-03, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d2-t0019", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "split": "train", "seed": 19, "path": "tasks/price-index/price-index-national-accounts-d2-t0019", "title": "GDP for 5 years", "checks": 28, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2015 and the reference year of the chain-linked index is 2012 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2012) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2012\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2015, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2012 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2012).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2012).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d3-t0020", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "split": "train", "seed": 20, "path": "tasks/price-index/price-index-basket-indices-d3-t0020", "title": "Price indices, 10 items over 5 years", "checks": 22, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2012, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2012\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d3-t0021", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "split": "train", "seed": 21, "path": "tasks/price-index/price-index-income-distribution-d3-t0021", "title": "Income distribution, 45 households", "checks": 15, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 45 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d3-t0022", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "split": "train", "seed": 22, "path": "tasks/price-index/price-index-inflation-contributions-d3-t0022", "title": "Inflation contributions, 11 categories", "checks": 22, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2015-03, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2015-03: rebased index = 100 x published index / published index of the same category in 2015-03. Use the rebased indices everywhere below.\n\nCompare 2016-05 (the current month) with 2015-05 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2015-05\"` and `\"2016-05\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2015-05 to 2016-05, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d3-t0023", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "split": "train", "seed": 23, "path": "tasks/price-index/price-index-national-accounts-d3-t0023", "title": "GDP for 5 years", "checks": 32, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2018 and the reference year of the chain-linked index is 2016 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2016) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2016 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2015\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2018, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2016 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2016 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2018 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2015 to 2019, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d1-t0024", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "split": "train", "seed": 24, "path": "tasks/price-index/price-index-basket-indices-d1-t0024", "title": "Price indices, 5 items over 3 years", "checks": 9, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2013, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2013\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d1-t0025", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "split": "train", "seed": 25, "path": "tasks/price-index/price-index-income-distribution-d1-t0025", "title": "Income distribution, 20 households", "checks": 10, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 20 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d1-t0026", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "split": "train", "seed": 26, "path": "tasks/price-index/price-index-inflation-contributions-d1-t0026", "title": "Inflation contributions, 5 categories", "checks": 9, "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2018-10 (the current month) with 2018-09 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2018-09\"` and `\"2018-10\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2018-09 to 2018-10, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d1-t0027", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "split": "train", "seed": 27, "path": "tasks/price-index/price-index-national-accounts-d1-t0027", "title": "GDP for 3 years", "checks": 13, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2017 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2017\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2017, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2017).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2017).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d2-t0028", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "split": "train", "seed": 28, "path": "tasks/price-index/price-index-basket-indices-d2-t0028", "title": "Price indices, 8 items over 4 years", "checks": 13, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2011, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2011\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d2-t0029", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "split": "train", "seed": 29, "path": "tasks/price-index/price-index-income-distribution-d2-t0029", "title": "Income distribution, 60 households", "checks": 13, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 60 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d2-t0030", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "split": "train", "seed": 30, "path": "tasks/price-index/price-index-inflation-contributions-d2-t0030", "title": "Inflation contributions, 8 categories", "checks": 13, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2024-04 (the current month) with 2023-04 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2023-04\"` and `\"2024-04\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2023-04 to 2024-04, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d2-t0031", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "split": "train", "seed": 31, "path": "tasks/price-index/price-index-national-accounts-d2-t0031", "title": "GDP for 5 years", "checks": 28, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2012 and the reference year of the chain-linked index is 2009 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2009) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2009\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2012, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2009 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2009).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2009).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d3-t0032", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "split": "train", "seed": 32, "path": "tasks/price-index/price-index-basket-indices-d3-t0032", "title": "Price indices, 10 items over 5 years", "checks": 22, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2013, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2013\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d3-t0033", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "split": "train", "seed": 33, "path": "tasks/price-index/price-index-income-distribution-d3-t0033", "title": "Income distribution, 40 households", "checks": 15, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 40 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d3-t0034", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "split": "train", "seed": 34, "path": "tasks/price-index/price-index-inflation-contributions-d3-t0034", "title": "Inflation contributions, 11 categories", "checks": 22, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2016-09, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2016-09: rebased index = 100 x published index / published index of the same category in 2016-09. Use the rebased indices everywhere below.\n\nCompare 2017-12 (the current month) with 2016-12 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2016-12\"` and `\"2017-12\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2016-12 to 2017-12, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d3-t0035", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "split": "train", "seed": 35, "path": "tasks/price-index/price-index-national-accounts-d3-t0035", "title": "GDP for 5 years", "checks": 32, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2020 and the reference year of the chain-linked index is 2019 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2019) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2019 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2017\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2020, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2019 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2019 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2020 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2017 to 2021, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d1-t0036", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "split": "train", "seed": 36, "path": "tasks/price-index/price-index-basket-indices-d1-t0036", "title": "Price indices, 5 items over 3 years", "checks": 9, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2016, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2016\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d1-t0037", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "split": "train", "seed": 37, "path": "tasks/price-index/price-index-income-distribution-d1-t0037", "title": "Income distribution, 25 households", "checks": 10, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 25 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d1-t0038", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "split": "train", "seed": 38, "path": "tasks/price-index/price-index-inflation-contributions-d1-t0038", "title": "Inflation contributions, 5 categories", "checks": 9, "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2016-02 (the current month) with 2016-01 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2016-01\"` and `\"2016-02\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2016-01 to 2016-02, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d1-t0039", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "split": "train", "seed": 39, "path": "tasks/price-index/price-index-national-accounts-d1-t0039", "title": "GDP for 3 years", "checks": 13, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2008 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2008\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2008, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2008).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2008).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d2-t0040", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "split": "train", "seed": 40, "path": "tasks/price-index/price-index-basket-indices-d2-t0040", "title": "Price indices, 8 items over 4 years", "checks": 13, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2016, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2016\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d2-t0041", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "split": "train", "seed": 41, "path": "tasks/price-index/price-index-income-distribution-d2-t0041", "title": "Income distribution, 40 households", "checks": 13, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 40 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d2-t0042", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "split": "train", "seed": 42, "path": "tasks/price-index/price-index-inflation-contributions-d2-t0042", "title": "Inflation contributions, 8 categories", "checks": 13, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2013-02 (the current month) with 2012-02 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2012-02\"` and `\"2013-02\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2012-02 to 2013-02, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d2-t0043", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "split": "train", "seed": 43, "path": "tasks/price-index/price-index-national-accounts-d2-t0043", "title": "GDP for 5 years", "checks": 28, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2017 and the reference year of the chain-linked index is 2013 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2013) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2013\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2017, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2013 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2013).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2013).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d3-t0044", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "split": "train", "seed": 44, "path": "tasks/price-index/price-index-basket-indices-d3-t0044", "title": "Price indices, 10 items over 5 years", "checks": 22, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2020, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2020\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d3-t0045", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "split": "train", "seed": 45, "path": "tasks/price-index/price-index-income-distribution-d3-t0045", "title": "Income distribution, 50 households", "checks": 15, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 50 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d3-t0046", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "split": "train", "seed": 46, "path": "tasks/price-index/price-index-inflation-contributions-d3-t0046", "title": "Inflation contributions, 11 categories", "checks": 22, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2014-02, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2014-02: rebased index = 100 x published index / published index of the same category in 2014-02. Use the rebased indices everywhere below.\n\nCompare 2015-04 (the current month) with 2014-04 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2014-04\"` and `\"2015-04\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2014-04 to 2015-04, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d3-t0047", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "split": "train", "seed": 47, "path": "tasks/price-index/price-index-national-accounts-d3-t0047", "title": "GDP for 5 years", "checks": 32, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2020 and the reference year of the chain-linked index is 2019 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2019) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2019 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2018\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2020, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2019 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2019 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2020 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2018 to 2022, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d1-t0048", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "split": "train", "seed": 48, "path": "tasks/price-index/price-index-basket-indices-d1-t0048", "title": "Price indices, 5 items over 3 years", "checks": 9, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2012, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2012\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d1-t0049", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "split": "train", "seed": 49, "path": "tasks/price-index/price-index-income-distribution-d1-t0049", "title": "Income distribution, 25 households", "checks": 10, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 25 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d1-t0050", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "split": "train", "seed": 50, "path": "tasks/price-index/price-index-inflation-contributions-d1-t0050", "title": "Inflation contributions, 5 categories", "checks": 9, "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2021-05 (the current month) with 2021-04 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2021-04\"` and `\"2021-05\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2021-04 to 2021-05, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d1-t0051", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "split": "train", "seed": 51, "path": "tasks/price-index/price-index-national-accounts-d1-t0051", "title": "GDP for 3 years", "checks": 13, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2014 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2014\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2014, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2014).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2014).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d2-t0052", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "split": "train", "seed": 52, "path": "tasks/price-index/price-index-basket-indices-d2-t0052", "title": "Price indices, 8 items over 4 years", "checks": 13, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2016, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2016\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d2-t0053", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "split": "train", "seed": 53, "path": "tasks/price-index/price-index-income-distribution-d2-t0053", "title": "Income distribution, 45 households", "checks": 13, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 45 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d2-t0054", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "split": "train", "seed": 54, "path": "tasks/price-index/price-index-inflation-contributions-d2-t0054", "title": "Inflation contributions, 8 categories", "checks": 13, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2021-07 (the current month) with 2020-07 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2020-07\"` and `\"2021-07\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2020-07 to 2021-07, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d2-t0055", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "split": "train", "seed": 55, "path": "tasks/price-index/price-index-national-accounts-d2-t0055", "title": "GDP for 5 years", "checks": 28, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2016 and the reference year of the chain-linked index is 2015 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2015) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2015\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2016, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2015 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2015).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2015).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d3-t0056", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "split": "train", "seed": 56, "path": "tasks/price-index/price-index-basket-indices-d3-t0056", "title": "Price indices, 10 items over 5 years", "checks": 22, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2012, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2012\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d3-t0057", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "split": "train", "seed": 57, "path": "tasks/price-index/price-index-income-distribution-d3-t0057", "title": "Income distribution, 40 households", "checks": 15, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 40 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d3-t0058", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "split": "train", "seed": 58, "path": "tasks/price-index/price-index-inflation-contributions-d3-t0058", "title": "Inflation contributions, 11 categories", "checks": 22, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2014-05, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2014-05: rebased index = 100 x published index / published index of the same category in 2014-05. Use the rebased indices everywhere below.\n\nCompare 2015-06 (the current month) with 2014-06 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2014-06\"` and `\"2015-06\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2014-06 to 2015-06, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d3-t0059", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "split": "train", "seed": 59, "path": "tasks/price-index/price-index-national-accounts-d3-t0059", "title": "GDP for 5 years", "checks": 32, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2011 and the reference year of the chain-linked index is 2012 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2012) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2012 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2011\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2011, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2012 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2012 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2011 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2011 to 2015, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d1-t0060", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "split": "train", "seed": 60, "path": "tasks/price-index/price-index-basket-indices-d1-t0060", "title": "Price indices, 5 items over 3 years", "checks": 9, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2014, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2014\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d1-t0061", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "split": "train", "seed": 61, "path": "tasks/price-index/price-index-income-distribution-d1-t0061", "title": "Income distribution, 25 households", "checks": 10, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 25 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d1-t0062", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "split": "train", "seed": 62, "path": "tasks/price-index/price-index-inflation-contributions-d1-t0062", "title": "Inflation contributions, 5 categories", "checks": 9, "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2020-06 (the current month) with 2020-05 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2020-05\"` and `\"2020-06\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2020-05 to 2020-06, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d1-t0063", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "split": "train", "seed": 63, "path": "tasks/price-index/price-index-national-accounts-d1-t0063", "title": "GDP for 3 years", "checks": 13, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2010 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2010\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2010, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2010).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2010).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d2-t0064", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "split": "train", "seed": 64, "path": "tasks/price-index/price-index-basket-indices-d2-t0064", "title": "Price indices, 8 items over 4 years", "checks": 13, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2015, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2015\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d2-t0065", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "split": "train", "seed": 65, "path": "tasks/price-index/price-index-income-distribution-d2-t0065", "title": "Income distribution, 60 households", "checks": 13, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 60 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d2-t0066", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "split": "train", "seed": 66, "path": "tasks/price-index/price-index-inflation-contributions-d2-t0066", "title": "Inflation contributions, 8 categories", "checks": 13, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2015-11 (the current month) with 2014-11 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2014-11\"` and `\"2015-11\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2014-11 to 2015-11, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d2-t0067", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "split": "train", "seed": 67, "path": "tasks/price-index/price-index-national-accounts-d2-t0067", "title": "GDP for 5 years", "checks": 28, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2020 and the reference year of the chain-linked index is 2017 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2017) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2017\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2020, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2017 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2017).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2017).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d3-t0068", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "split": "train", "seed": 68, "path": "tasks/price-index/price-index-basket-indices-d3-t0068", "title": "Price indices, 10 items over 5 years", "checks": 22, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2019, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2019\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d3-t0069", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "split": "train", "seed": 69, "path": "tasks/price-index/price-index-income-distribution-d3-t0069", "title": "Income distribution, 50 households", "checks": 15, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 50 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d3-t0070", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "split": "train", "seed": 70, "path": "tasks/price-index/price-index-inflation-contributions-d3-t0070", "title": "Inflation contributions, 11 categories", "checks": 22, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2022-02, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2022-02: rebased index = 100 x published index / published index of the same category in 2022-02. Use the rebased indices everywhere below.\n\nCompare 2023-04 (the current month) with 2022-04 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2022-04\"` and `\"2023-04\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2022-04 to 2023-04, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d3-t0071", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "split": "train", "seed": 71, "path": "tasks/price-index/price-index-national-accounts-d3-t0071", "title": "GDP for 5 years", "checks": 32, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2019 and the reference year of the chain-linked index is 2016 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2016) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2016 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2015\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2019, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2016 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2016 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2019 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2015 to 2019, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d1-t0072", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "split": "train", "seed": 72, "path": "tasks/price-index/price-index-basket-indices-d1-t0072", "title": "Price indices, 5 items over 3 years", "checks": 9, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2015, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2015\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d1-t0073", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "split": "train", "seed": 73, "path": "tasks/price-index/price-index-income-distribution-d1-t0073", "title": "Income distribution, 20 households", "checks": 10, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 20 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d1-t0074", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "split": "train", "seed": 74, "path": "tasks/price-index/price-index-inflation-contributions-d1-t0074", "title": "Inflation contributions, 5 categories", "checks": 9, "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2014-08 (the current month) with 2014-07 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2014-07\"` and `\"2014-08\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2014-07 to 2014-08, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d1-t0075", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "split": "train", "seed": 75, "path": "tasks/price-index/price-index-national-accounts-d1-t0075", "title": "GDP for 3 years", "checks": 13, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2018 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2018\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2018, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2018).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2018).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d2-t0076", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "split": "train", "seed": 76, "path": "tasks/price-index/price-index-basket-indices-d2-t0076", "title": "Price indices, 8 items over 4 years", "checks": 13, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2019, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2019\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d2-t0077", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "split": "train", "seed": 77, "path": "tasks/price-index/price-index-income-distribution-d2-t0077", "title": "Income distribution, 60 households", "checks": 13, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 60 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d2-t0078", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "split": "train", "seed": 78, "path": "tasks/price-index/price-index-inflation-contributions-d2-t0078", "title": "Inflation contributions, 8 categories", "checks": 13, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2018-01 (the current month) with 2017-01 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2017-01\"` and `\"2018-01\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2017-01 to 2018-01, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d2-t0079", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "split": "train", "seed": 79, "path": "tasks/price-index/price-index-national-accounts-d2-t0079", "title": "GDP for 5 years", "checks": 28, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2015 and the reference year of the chain-linked index is 2012 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2012) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2012\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2015, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2012 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2012).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2012).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d3-t0080", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "split": "train", "seed": 80, "path": "tasks/price-index/price-index-basket-indices-d3-t0080", "title": "Price indices, 10 items over 5 years", "checks": 22, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2018, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2018\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d3-t0081", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "split": "train", "seed": 81, "path": "tasks/price-index/price-index-income-distribution-d3-t0081", "title": "Income distribution, 35 households", "checks": 15, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 35 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d3-t0082", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "split": "train", "seed": 82, "path": "tasks/price-index/price-index-inflation-contributions-d3-t0082", "title": "Inflation contributions, 11 categories", "checks": 22, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2019-06, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2019-06: rebased index = 100 x published index / published index of the same category in 2019-06. Use the rebased indices everywhere below.\n\nCompare 2020-07 (the current month) with 2019-07 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2019-07\"` and `\"2020-07\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2019-07 to 2020-07, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d3-t0083", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "split": "train", "seed": 83, "path": "tasks/price-index/price-index-national-accounts-d3-t0083", "title": "GDP for 5 years", "checks": 32, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2017 and the reference year of the chain-linked index is 2019 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2019) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2019 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2016\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2017, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2019 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2019 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2017 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2016 to 2020, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d1-e0000", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "split": "eval", "seed": 10000, "path": "tasks/price-index/price-index-basket-indices-d1-e0000", "title": "Price indices, 5 items over 3 years", "checks": 9, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2016, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2016\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d1-e0001", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "split": "eval", "seed": 10001, "path": "tasks/price-index/price-index-income-distribution-d1-e0001", "title": "Income distribution, 30 households", "checks": 10, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 30 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d1-e0002", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "split": "eval", "seed": 10002, "path": "tasks/price-index/price-index-inflation-contributions-d1-e0002", "title": "Inflation contributions, 5 categories", "checks": 9, "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2012-03 (the current month) with 2012-02 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2012-02\"` and `\"2012-03\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2012-02 to 2012-03, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d1-e0003", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "split": "eval", "seed": 10003, "path": "tasks/price-index/price-index-national-accounts-d1-e0003", "title": "GDP for 3 years", "checks": 13, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2017 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2017\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2017, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2017).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2017).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d2-e0004", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "split": "eval", "seed": 10004, "path": "tasks/price-index/price-index-basket-indices-d2-e0004", "title": "Price indices, 8 items over 4 years", "checks": 13, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2019, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2019\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d2-e0005", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "split": "eval", "seed": 10005, "path": "tasks/price-index/price-index-income-distribution-d2-e0005", "title": "Income distribution, 40 households", "checks": 13, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 40 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d2-e0006", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "split": "eval", "seed": 10006, "path": "tasks/price-index/price-index-inflation-contributions-d2-e0006", "title": "Inflation contributions, 8 categories", "checks": 13, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2023-07 (the current month) with 2022-07 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2022-07\"` and `\"2023-07\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2022-07 to 2023-07, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d2-e0007", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "split": "eval", "seed": 10007, "path": "tasks/price-index/price-index-national-accounts-d2-e0007", "title": "GDP for 5 years", "checks": 28, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2013 and the reference year of the chain-linked index is 2011 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2011) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2011\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2013, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2011 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2011).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2011).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d3-e0008", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "split": "eval", "seed": 10008, "path": "tasks/price-index/price-index-basket-indices-d3-e0008", "title": "Price indices, 10 items over 5 years", "checks": 22, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2015, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2015\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d3-e0009", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "split": "eval", "seed": 10009, "path": "tasks/price-index/price-index-income-distribution-d3-e0009", "title": "Income distribution, 40 households", "checks": 15, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 40 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d3-e0010", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "split": "eval", "seed": 10010, "path": "tasks/price-index/price-index-inflation-contributions-d3-e0010", "title": "Inflation contributions, 11 categories", "checks": 22, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2021-02, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2021-02: rebased index = 100 x published index / published index of the same category in 2021-02. Use the rebased indices everywhere below.\n\nCompare 2022-04 (the current month) with 2021-04 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2021-04\"` and `\"2022-04\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2021-04 to 2022-04, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d3-e0011", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "split": "eval", "seed": 10011, "path": "tasks/price-index/price-index-national-accounts-d3-e0011", "title": "GDP for 5 years", "checks": 32, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2014 and the reference year of the chain-linked index is 2013 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2013) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2013 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2011\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2014, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2013 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2013 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2014 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2011 to 2015, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d1-e0012", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 1, "split": "eval", "seed": 10012, "path": "tasks/price-index/price-index-basket-indices-d1-e0012", "title": "Price indices, 5 items over 3 years", "checks": 9, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 3 years. Prices are in crowns (CRN).\n\nThe base year is 2012, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2012\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 3 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d1-e0013", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 1, "split": "eval", "seed": 10013, "path": "tasks/price-index/price-index-income-distribution-d1-e0013", "title": "Income distribution, 20 households", "checks": 10, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual disposable income of 20 households from a survey. Each household is one observation.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d1-e0014", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 1, "split": "eval", "seed": 10014, "path": "tasks/price-index/price-index-inflation-contributions-d1-e0014", "title": "Inflation contributions, 5 categories", "checks": 9, "instruction": "# Contributions to inflation\n\n`weights.csv` gives the weight of each category in parts per thousand. `indices.csv` gives each category's price index in two months. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2018-09 (the current month) with 2018-08 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2018-08\"` and `\"2018-09\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2018-08 to 2018-09, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d1-e0015", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 1, "split": "eval", "seed": 10015, "path": "tasks/price-index/price-index-national-accounts-d1-e0015", "title": "GDP for 3 years", "checks": 13, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each final good or service in a small economy over 3 years. The base year is 2019 (also in `accounts.json`).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2019\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2019, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2019).\n - `inflation_percent`: percentage change of the deflator from the year before, 2 decimals (leave it out for 2019).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d2-e0016", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 2, "split": "eval", "seed": 10016, "path": "tasks/price-index/price-index-basket-indices-d2-e0016", "title": "Price indices, 8 items over 4 years", "checks": 13, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price per unit and the quantity bought of each item in 4 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\nThe base year is 2011, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2011\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 4 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d2-e0017", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 2, "split": "eval", "seed": 10017, "path": "tasks/price-index/price-index-income-distribution-d2-e0017", "title": "Income distribution, 40 households", "checks": 13, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components of 40 households from a survey. Each household is one observation. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the households, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 households). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `households`: the number of households, an integer.\n- `mean_income` and `median_income`: of household disposable income, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `households_at_risk`: the number of households with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all households, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d2-e0018", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 2, "split": "eval", "seed": 10018, "path": "tasks/price-index/price-index-inflation-contributions-d2-e0018", "title": "Inflation contributions, 8 categories", "checks": 13, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in the period the weights refer to; the weights do not add up to 1 or to 1000, so divide by their sum. `indices.csv` gives each category's monthly price index, in no particular order and for more months than you need. Every category's index equals 100 in the period the weights refer to.\n\nCompare 2014-02 (the current month) with 2013-02 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2013-02\"` and `\"2014-02\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2013-02 to 2014-02, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d2-e0019", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 2, "split": "eval", "seed": 10019, "path": "tasks/price-index/price-index-national-accounts-d2-e0019", "title": "GDP for 5 years", "checks": 28, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2014 and the reference year of the chain-linked index is 2014 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2014) = 100, and index(t) = index(t-1) x link(t) for each later year.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2014\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2014, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2014 = 100, 2 decimals.\n - `real_growth_percent`: percentage change of real GDP from the year before, 2 decimals (leave it out for 2014).\n - `chain_growth_percent`: percentage change of the chain-linked index from the year before, 2 decimals (leave it out for 2014).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-basket-indices-d3-e0020", "env": "price-index", "isced_f": "0311", "family": "basket-indices", "difficulty": 3, "split": "eval", "seed": 10020, "path": "tasks/price-index/price-index-basket-indices-d3-e0020", "title": "Price indices, 10 items over 5 years", "checks": 22, "instruction": "# Price indices for a household basket\n\n`basket.csv` gives, for a reference household, the price and the quantity bought of each item in up to 5 years, in no particular order. Some items are imported and priced in a foreign currency. Convert every price to crowns (CRN) with the rate for the same period in `exchange_rates.csv` (crowns per one unit of the foreign currency). Prices already in CRN need no conversion.\n\n`price` is the price of one pack of `pack_size` `pack_unit`, and the pack on sale can change from one year to the next. `quantity` is the amount bought, in `quantity_unit` (kg, litre or each). Before anything else, turn every price into a price per `quantity_unit`: 1 kg = 1000 g; 1 litre = 100 cl = 1000 ml; 1 dozen = 12 items (`each`).\n\nSome items were not on sale, or not priced, in every year. Use only the items that have a row in all 5 years, and leave the others out of every calculation, in every year.\n\nThe base year is 2015, the earliest year. With p for price, q for quantity, 0 for the base year and t for the year in question, and sums running over the items:\n\n- Laspeyres index = 100 x sum(p_t x q_0) / sum(p_0 x q_0)\n- Paasche index = 100 x sum(p_t x q_t) / sum(p_0 x q_t)\n- Fisher index = square root of (Laspeyres x Paasche)\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `basket_cost`: object keyed by year (as a string, for example `\"2015\"`): what the household spent that year, the sum of price x quantity in crowns, 2 decimals. One entry for each of the 5 years.\n- `indices`: object keyed by year, for every year after the base year. Each value has `laspeyres`, `paasche` and `fisher`, 2 decimals.\n- `excluded_items`: list of the items left out because they lack a row in some year (any order).\n- `fisher_change_percent`: object keyed by year, for every year after the base year: the percentage change of the Fisher index from the year before (the base-year index is 100), 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-income-distribution-d3-e0021", "env": "price-index", "isced_f": "0311", "family": "income-distribution", "difficulty": 3, "split": "eval", "seed": 10021, "path": "tasks/price-index/price-index-income-distribution-d3-e0021", "title": "Income distribution, 40 households", "checks": 15, "instruction": "# Income distribution from a household survey\n\n`households.csv` gives the annual income components and the composition of 40 households from a survey. Disposable income = `wages` + `self_employment_income` + `pensions_and_benefits` - `taxes_paid`.\n\nWork with **equivalised** income per **person**. A household's equivalence scale is 1.0 for the first member aged 14 or over, plus 0.5 for each further member aged 14 or over, plus 0.3 for each child under 14. Its equivalised income is its disposable income divided by that scale. Every member of the household, children included, is then one observation with the household's equivalised income: a household of four people counts four times. All the measures below are computed over persons (n = the number of persons).\n\nGini coefficient: sort the incomes from lowest to highest and number them i = 1, 2, ..., n. Then\n\n G = 2 x sum(i x income_i) / (n x sum(income_i)) - (n + 1) / n\n\nQuintile shares: with the incomes sorted from lowest to highest, Q1 is the poorest fifth of the persons, Q5 the richest fifth (n is a multiple of 5, so each fifth holds exactly n / 5 persons). A quintile's share is its total income as a percentage of everyone's total income. S80/S20 is the total income of Q5 divided by the total income of Q1.\n\nMedian: the middle value of the sorted incomes; with an even n, the mean of the two middle values.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `persons`: the number of persons, an integer.\n- `mean_income` and `median_income`: of equivalised disposable income per person, 2 decimals.\n- `gini`: the Gini coefficient, 4 decimals.\n- `quintile_shares_percent`: object with keys `Q1` to `Q5`: each quintile's share of total income in per cent, 2 decimals.\n- `s80_s20`: the income quintile share ratio, 2 decimals.\n- `poverty_threshold`: 60% of the median income, 2 decimals.\n- `persons_at_risk`: the number of persons with an income strictly below the threshold, an integer.\n- `at_risk_of_poverty_rate_percent`: that number as a percentage of all persons, 2 decimals.\n- `children_at_risk`: the number of children under 14 living in households below the threshold, an integer.\n- `child_at_risk_rate_percent`: that number as a percentage of all children under 14, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-inflation-contributions-d3-e0022", "env": "price-index", "isced_f": "0311", "family": "inflation-contributions", "difficulty": 3, "split": "eval", "seed": 10022, "path": "tasks/price-index/price-index-inflation-contributions-d3-e0022", "title": "Inflation contributions, 11 categories", "checks": 22, "instruction": "# Contributions to inflation\n\n`weights.csv` gives each category's weight as household spending (in millions) in 2014-01, the month the weights refer to; divide by the sum of the weights you are using. It also marks each category as `food`, `energy` or `other`. `indices.csv` gives each category's monthly price index as published, in no particular order and for more months than you need. The published series do not all equal 100 in the same month. First rebase every category so that it equals 100 in 2014-01: rebased index = 100 x published index / published index of the same category in 2014-01. Use the rebased indices everywhere below.\n\nCompare 2015-03 (the current month) with 2014-03 (the comparison month); both are named in `request.json`. This is a fixed-weight index, so:\n\n- All-items index in a month = sum(w_i x I_i) / sum(w_i), where w_i is the weight of category i and I_i its index in that month.\n- Inflation rate = (all-items index in the current month / all-items index in the comparison month - 1) x 100.\n- Contribution of category i = (w_i / sum(w)) x (I_i in the current month - I_i in the comparison month) / (all-items index in the comparison month) x 100.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `all_items_index`: object with the all-items index for the two months, keyed by month (`\"2014-03\"` and `\"2015-03\"`), 2 decimals.\n- `inflation_percent`: the percentage change of the all-items index from 2014-03 to 2015-03, 2 decimals.\n- `contributions`: object keyed by category: its contribution to that change in percentage points, 3 decimals (negative if its prices fell). The contributions add up to the inflation rate.\n- `largest_contributor`: the category with the largest contribution.\n- `smallest_contributor`: the category with the smallest contribution (the most negative one if any are negative).\n- `core_index`: object keyed by the same two months: the index of the core aggregate, which is the categories marked `other` only (no food, no energy), built like the all-items index but with those categories and their weights alone, 2 decimals.\n- `core_inflation_percent`: the percentage change of the core index between the two months, 2 decimals.\n- `group_contributions`: object with keys `food`, `energy` and `other`: the sum of the contributions (to all-items inflation, as above) of the categories in each group, 3 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "price-index-national-accounts-d3-e0023", "env": "price-index", "isced_f": "0311", "family": "national-accounts", "difficulty": 3, "split": "eval", "seed": 10023, "path": "tasks/price-index/price-index-national-accounts-d3-e0023", "title": "GDP for 5 years", "checks": 32, "instruction": "# National accounts: nominal, real and chain-linked GDP\n\n`output.csv` gives the quantity produced and the unit price of each product in a small economy over 5 years, in no particular order. GDP here is the value of **final** goods and services only: rows whose `use` is `intermediate` are inputs already contained in the value of the final products, so leave them out of every calculation. The base year for constant prices is 2011 and the reference year of the chain-linked index is 2012 (both also in `accounts.json`).\n\nThe chain-linked volume index links each year to the year before at the earlier year's prices:\n\n- link(t) = sum(p_(t-1) x q_t) / sum(p_(t-1) x q_(t-1))\n- index(2012) = 100, and index(t) = index(t-1) x link(t) for each later year. For the years before 2012 work backwards: index(t-1) = index(t) / link(t).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `years`: object keyed by year (as a string, for example `\"2010\"`). Each value has\n - `nominal_gdp`: the year's output valued at the year's own prices, sum(p_t x q_t), 2 decimals.\n - `real_gdp`: the year's output valued at the prices of the base year 2011, sum(p_base x q_t), 2 decimals.\n - `deflator`: the GDP deflator, 100 x nominal GDP / real GDP, 2 decimals.\n - `chain_index`: the chain-linked volume index, with 2012 = 100, 2 decimals.\n - `chained_volume_gdp`: GDP in chained volume terms, nominal GDP of 2012 x chain index / 100, 2 decimals.\n - `real_gdp_per_capita`: real GDP (at 2011 prices) divided by the year's population in `population.csv`, 2 decimals.\n- `average_real_growth_percent`: the average annual growth rate of real GDP from 2010 to 2014, ((last / first)^(1/4) - 1) x 100, 2 decimals.\n- `average_chain_growth_percent`: the same average annual growth rate computed from the chain-linked index, 2 decimals.\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-norms-d1-t0000", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "split": "train", "seed": 0, "path": "tasks/psychometrics/psychometrics-norms-d1-t0000", "title": "Norm-referenced scores for 6 clients", "checks": 18, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d1-t0001", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "split": "train", "seed": 1, "path": "tasks/psychometrics/psychometrics-reliability-d1-t0001", "title": "Reliability of a 5-item scale", "checks": 12, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Study Motivation Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d1-t0002", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "split": "train", "seed": 2, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-t0002", "title": "Reliable change for 6 clients", "checks": 15, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d1-t0003", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "split": "train", "seed": 3, "path": "tasks/psychometrics/psychometrics-scoring-d1-t0003", "title": "Score the Stress Checklist for 5 clients", "checks": 21, "instruction": "# Questionnaire scoring: Stress Checklist\n\n`responses.csv` holds the item responses of 5 clients to the Stress Checklist, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none)."} +{"id": "psychometrics-norms-d2-t0004", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "split": "train", "seed": 4, "path": "tasks/psychometrics/psychometrics-norms-d2-t0004", "title": "Norm-referenced scores for 8 clients", "checks": 25, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Withdrawal Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d2-t0005", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "split": "train", "seed": 5, "path": "tasks/psychometrics/psychometrics-reliability-d2-t0005", "title": "Reliability of a 7-item scale", "checks": 17, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Social Confidence Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d2-t0006", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "split": "train", "seed": 6, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-t0006", "title": "Reliable change for 8 clients", "checks": 33, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d2-t0007", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "split": "train", "seed": 7, "path": "tasks/psychometrics/psychometrics-scoring-d2-t0007", "title": "Score the Daily Strain Scale for 7 clients", "checks": 34, "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 7 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none)."} +{"id": "psychometrics-norms-d3-t0008", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "split": "train", "seed": 8, "path": "tasks/psychometrics/psychometrics-norms-d3-t0008", "title": "Norm-referenced scores for 5 clients", "checks": 38, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d3-t0009", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "split": "train", "seed": 9, "path": "tasks/psychometrics/psychometrics-reliability-d3-t0009", "title": "Reliability of a 8-item scale", "checks": 30, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 33 people to the 8 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d3-t0010", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "split": "train", "seed": 10, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-t0010", "title": "Reliable change for 6 clients", "checks": 43, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d3-t0011", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "split": "train", "seed": 11, "path": "tasks/psychometrics/psychometrics-scoring-d3-t0011", "title": "Score the Worry Questionnaire for 7 clients", "checks": 42, "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none)."} +{"id": "psychometrics-norms-d1-t0012", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "split": "train", "seed": 12, "path": "tasks/psychometrics/psychometrics-norms-d1-t0012", "title": "Norm-referenced scores for 6 clients", "checks": 18, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Attention Difficulties Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d1-t0013", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "split": "train", "seed": 13, "path": "tasks/psychometrics/psychometrics-reliability-d1-t0013", "title": "Reliability of a 5-item scale", "checks": 12, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Social Confidence Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d1-t0014", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "split": "train", "seed": 14, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-t0014", "title": "Reliable change for 6 clients", "checks": 15, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d1-t0015", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "split": "train", "seed": 15, "path": "tasks/psychometrics/psychometrics-scoring-d1-t0015", "title": "Score the Worry Questionnaire for 5 clients", "checks": 21, "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 5 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none)."} +{"id": "psychometrics-norms-d2-t0016", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "split": "train", "seed": 16, "path": "tasks/psychometrics/psychometrics-norms-d2-t0016", "title": "Norm-referenced scores for 8 clients", "checks": 25, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d2-t0017", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "split": "train", "seed": 17, "path": "tasks/psychometrics/psychometrics-reliability-d2-t0017", "title": "Reliability of a 7-item scale", "checks": 17, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d2-t0018", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "split": "train", "seed": 18, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-t0018", "title": "Reliable change for 8 clients", "checks": 33, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d2-t0019", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "split": "train", "seed": 19, "path": "tasks/psychometrics/psychometrics-scoring-d2-t0019", "title": "Score the Worry Questionnaire for 7 clients", "checks": 31, "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none)."} +{"id": "psychometrics-norms-d3-t0020", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "split": "train", "seed": 20, "path": "tasks/psychometrics/psychometrics-norms-d3-t0020", "title": "Norm-referenced scores for 5 clients", "checks": 38, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d3-t0021", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "split": "train", "seed": 21, "path": "tasks/psychometrics/psychometrics-reliability-d3-t0021", "title": "Reliability of a 8-item scale", "checks": 30, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 33 people to the 8 items of the Work Engagement Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d3-t0022", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "split": "train", "seed": 22, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-t0022", "title": "Reliable change for 6 clients", "checks": 41, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d3-t0023", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "split": "train", "seed": 23, "path": "tasks/psychometrics/psychometrics-scoring-d3-t0023", "title": "Score the Stress Checklist for 7 clients", "checks": 42, "instruction": "# Questionnaire scoring: Stress Checklist\n\n`responses.csv` holds the item responses of 7 clients to the Stress Checklist, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none)."} +{"id": "psychometrics-norms-d1-t0024", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "split": "train", "seed": 24, "path": "tasks/psychometrics/psychometrics-norms-d1-t0024", "title": "Norm-referenced scores for 6 clients", "checks": 18, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Fatigue Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d1-t0025", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "split": "train", "seed": 25, "path": "tasks/psychometrics/psychometrics-reliability-d1-t0025", "title": "Reliability of a 5-item scale", "checks": 12, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Work Engagement Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d1-t0026", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "split": "train", "seed": 26, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-t0026", "title": "Reliable change for 6 clients", "checks": 15, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d1-t0027", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "split": "train", "seed": 27, "path": "tasks/psychometrics/psychometrics-scoring-d1-t0027", "title": "Score the Worry Questionnaire for 5 clients", "checks": 21, "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 5 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none)."} +{"id": "psychometrics-norms-d2-t0028", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "split": "train", "seed": 28, "path": "tasks/psychometrics/psychometrics-norms-d2-t0028", "title": "Norm-referenced scores for 8 clients", "checks": 25, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Fatigue Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d2-t0029", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "split": "train", "seed": 29, "path": "tasks/psychometrics/psychometrics-reliability-d2-t0029", "title": "Reliability of a 7-item scale", "checks": 17, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Social Confidence Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d2-t0030", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "split": "train", "seed": 30, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-t0030", "title": "Reliable change for 8 clients", "checks": 35, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d2-t0031", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "split": "train", "seed": 31, "path": "tasks/psychometrics/psychometrics-scoring-d2-t0031", "title": "Score the Worry Questionnaire for 7 clients", "checks": 31, "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none)."} +{"id": "psychometrics-norms-d3-t0032", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "split": "train", "seed": 32, "path": "tasks/psychometrics/psychometrics-norms-d3-t0032", "title": "Norm-referenced scores for 5 clients", "checks": 38, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d3-t0033", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "split": "train", "seed": 33, "path": "tasks/psychometrics/psychometrics-reliability-d3-t0033", "title": "Reliability of a 8-item scale", "checks": 30, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 35 people to the 8 items of the Study Motivation Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d3-t0034", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "split": "train", "seed": 34, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-t0034", "title": "Reliable change for 6 clients", "checks": 43, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d3-t0035", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "split": "train", "seed": 35, "path": "tasks/psychometrics/psychometrics-scoring-d3-t0035", "title": "Score the Mood Inventory for 7 clients", "checks": 42, "instruction": "# Questionnaire scoring: Mood Inventory\n\n`responses.csv` holds the item responses of 7 clients to the Mood Inventory, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none)."} +{"id": "psychometrics-norms-d1-t0036", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "split": "train", "seed": 36, "path": "tasks/psychometrics/psychometrics-norms-d1-t0036", "title": "Norm-referenced scores for 6 clients", "checks": 18, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Fatigue Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d1-t0037", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "split": "train", "seed": 37, "path": "tasks/psychometrics/psychometrics-reliability-d1-t0037", "title": "Reliability of a 5-item scale", "checks": 12, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d1-t0038", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "split": "train", "seed": 38, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-t0038", "title": "Reliable change for 6 clients", "checks": 15, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d1-t0039", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "split": "train", "seed": 39, "path": "tasks/psychometrics/psychometrics-scoring-d1-t0039", "title": "Score the Daily Strain Scale for 5 clients", "checks": 21, "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 5 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none)."} +{"id": "psychometrics-norms-d2-t0040", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "split": "train", "seed": 40, "path": "tasks/psychometrics/psychometrics-norms-d2-t0040", "title": "Norm-referenced scores for 8 clients", "checks": 25, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Withdrawal Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d2-t0041", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "split": "train", "seed": 41, "path": "tasks/psychometrics/psychometrics-reliability-d2-t0041", "title": "Reliability of a 7-item scale", "checks": 17, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Study Motivation Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d2-t0042", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "split": "train", "seed": 42, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-t0042", "title": "Reliable change for 8 clients", "checks": 35, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d2-t0043", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "split": "train", "seed": 43, "path": "tasks/psychometrics/psychometrics-scoring-d2-t0043", "title": "Score the Daily Strain Scale for 7 clients", "checks": 34, "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 7 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none)."} +{"id": "psychometrics-norms-d3-t0044", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "split": "train", "seed": 44, "path": "tasks/psychometrics/psychometrics-norms-d3-t0044", "title": "Norm-referenced scores for 5 clients", "checks": 38, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d3-t0045", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "split": "train", "seed": 45, "path": "tasks/psychometrics/psychometrics-reliability-d3-t0045", "title": "Reliability of a 8-item scale", "checks": 30, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 33 people to the 8 items of the Social Confidence Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d3-t0046", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "split": "train", "seed": 46, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-t0046", "title": "Reliable change for 6 clients", "checks": 43, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d3-t0047", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "split": "train", "seed": 47, "path": "tasks/psychometrics/psychometrics-scoring-d3-t0047", "title": "Score the Worry Questionnaire for 7 clients", "checks": 42, "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none)."} +{"id": "psychometrics-norms-d1-t0048", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "split": "train", "seed": 48, "path": "tasks/psychometrics/psychometrics-norms-d1-t0048", "title": "Norm-referenced scores for 6 clients", "checks": 18, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d1-t0049", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "split": "train", "seed": 49, "path": "tasks/psychometrics/psychometrics-reliability-d1-t0049", "title": "Reliability of a 5-item scale", "checks": 12, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d1-t0050", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "split": "train", "seed": 50, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-t0050", "title": "Reliable change for 6 clients", "checks": 15, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d1-t0051", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "split": "train", "seed": 51, "path": "tasks/psychometrics/psychometrics-scoring-d1-t0051", "title": "Score the Daily Strain Scale for 5 clients", "checks": 21, "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 5 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none)."} +{"id": "psychometrics-norms-d2-t0052", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "split": "train", "seed": 52, "path": "tasks/psychometrics/psychometrics-norms-d2-t0052", "title": "Norm-referenced scores for 8 clients", "checks": 25, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d2-t0053", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "split": "train", "seed": 53, "path": "tasks/psychometrics/psychometrics-reliability-d2-t0053", "title": "Reliability of a 7-item scale", "checks": 17, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d2-t0054", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "split": "train", "seed": 54, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-t0054", "title": "Reliable change for 8 clients", "checks": 33, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d2-t0055", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "split": "train", "seed": 55, "path": "tasks/psychometrics/psychometrics-scoring-d2-t0055", "title": "Score the Mood Inventory for 7 clients", "checks": 31, "instruction": "# Questionnaire scoring: Mood Inventory\n\n`responses.csv` holds the item responses of 7 clients to the Mood Inventory, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none)."} +{"id": "psychometrics-norms-d3-t0056", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "split": "train", "seed": 56, "path": "tasks/psychometrics/psychometrics-norms-d3-t0056", "title": "Norm-referenced scores for 5 clients", "checks": 38, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d3-t0057", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "split": "train", "seed": 57, "path": "tasks/psychometrics/psychometrics-reliability-d3-t0057", "title": "Reliability of a 8-item scale", "checks": 30, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 33 people to the 8 items of the Work Engagement Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d3-t0058", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "split": "train", "seed": 58, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-t0058", "title": "Reliable change for 6 clients", "checks": 41, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d3-t0059", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "split": "train", "seed": 59, "path": "tasks/psychometrics/psychometrics-scoring-d3-t0059", "title": "Score the Mood Inventory for 7 clients", "checks": 39, "instruction": "# Questionnaire scoring: Mood Inventory\n\n`responses.csv` holds the item responses of 7 clients to the Mood Inventory, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none)."} +{"id": "psychometrics-norms-d1-t0060", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "split": "train", "seed": 60, "path": "tasks/psychometrics/psychometrics-norms-d1-t0060", "title": "Norm-referenced scores for 6 clients", "checks": 18, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Fatigue Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d1-t0061", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "split": "train", "seed": 61, "path": "tasks/psychometrics/psychometrics-reliability-d1-t0061", "title": "Reliability of a 5-item scale", "checks": 12, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d1-t0062", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "split": "train", "seed": 62, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-t0062", "title": "Reliable change for 6 clients", "checks": 15, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d1-t0063", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "split": "train", "seed": 63, "path": "tasks/psychometrics/psychometrics-scoring-d1-t0063", "title": "Score the Mood Inventory for 5 clients", "checks": 21, "instruction": "# Questionnaire scoring: Mood Inventory\n\n`responses.csv` holds the item responses of 5 clients to the Mood Inventory, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none)."} +{"id": "psychometrics-norms-d2-t0064", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "split": "train", "seed": 64, "path": "tasks/psychometrics/psychometrics-norms-d2-t0064", "title": "Norm-referenced scores for 8 clients", "checks": 25, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Fatigue Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d2-t0065", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "split": "train", "seed": 65, "path": "tasks/psychometrics/psychometrics-reliability-d2-t0065", "title": "Reliability of a 7-item scale", "checks": 17, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d2-t0066", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "split": "train", "seed": 66, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-t0066", "title": "Reliable change for 8 clients", "checks": 33, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d2-t0067", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "split": "train", "seed": 67, "path": "tasks/psychometrics/psychometrics-scoring-d2-t0067", "title": "Score the Daily Strain Scale for 7 clients", "checks": 34, "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 7 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none)."} +{"id": "psychometrics-norms-d3-t0068", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "split": "train", "seed": 68, "path": "tasks/psychometrics/psychometrics-norms-d3-t0068", "title": "Norm-referenced scores for 5 clients", "checks": 38, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d3-t0069", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "split": "train", "seed": 69, "path": "tasks/psychometrics/psychometrics-reliability-d3-t0069", "title": "Reliability of a 8-item scale", "checks": 30, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 33 people to the 8 items of the Social Confidence Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d3-t0070", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "split": "train", "seed": 70, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-t0070", "title": "Reliable change for 6 clients", "checks": 43, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d3-t0071", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "split": "train", "seed": 71, "path": "tasks/psychometrics/psychometrics-scoring-d3-t0071", "title": "Score the Worry Questionnaire for 7 clients", "checks": 39, "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none)."} +{"id": "psychometrics-norms-d1-t0072", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "split": "train", "seed": 72, "path": "tasks/psychometrics/psychometrics-norms-d1-t0072", "title": "Norm-referenced scores for 6 clients", "checks": 18, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d1-t0073", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "split": "train", "seed": 73, "path": "tasks/psychometrics/psychometrics-reliability-d1-t0073", "title": "Reliability of a 5-item scale", "checks": 12, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d1-t0074", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "split": "train", "seed": 74, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-t0074", "title": "Reliable change for 6 clients", "checks": 15, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d1-t0075", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "split": "train", "seed": 75, "path": "tasks/psychometrics/psychometrics-scoring-d1-t0075", "title": "Score the Daily Strain Scale for 5 clients", "checks": 21, "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 5 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none)."} +{"id": "psychometrics-norms-d2-t0076", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "split": "train", "seed": 76, "path": "tasks/psychometrics/psychometrics-norms-d2-t0076", "title": "Norm-referenced scores for 8 clients", "checks": 25, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d2-t0077", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "split": "train", "seed": 77, "path": "tasks/psychometrics/psychometrics-reliability-d2-t0077", "title": "Reliability of a 7-item scale", "checks": 17, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d2-t0078", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "split": "train", "seed": 78, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-t0078", "title": "Reliable change for 8 clients", "checks": 33, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d2-t0079", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "split": "train", "seed": 79, "path": "tasks/psychometrics/psychometrics-scoring-d2-t0079", "title": "Score the Worry Questionnaire for 7 clients", "checks": 31, "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none)."} +{"id": "psychometrics-norms-d3-t0080", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "split": "train", "seed": 80, "path": "tasks/psychometrics/psychometrics-norms-d3-t0080", "title": "Norm-referenced scores for 5 clients", "checks": 38, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d3-t0081", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "split": "train", "seed": 81, "path": "tasks/psychometrics/psychometrics-reliability-d3-t0081", "title": "Reliability of a 8-item scale", "checks": 30, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 35 people to the 8 items of the Work Engagement Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d3-t0082", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "split": "train", "seed": 82, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-t0082", "title": "Reliable change for 6 clients", "checks": 43, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d3-t0083", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "split": "train", "seed": 83, "path": "tasks/psychometrics/psychometrics-scoring-d3-t0083", "title": "Score the Worry Questionnaire for 7 clients", "checks": 42, "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none)."} +{"id": "psychometrics-norms-d1-e0000", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "split": "eval", "seed": 10000, "path": "tasks/psychometrics/psychometrics-norms-d1-e0000", "title": "Norm-referenced scores for 6 clients", "checks": 18, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d1-e0001", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "split": "eval", "seed": 10001, "path": "tasks/psychometrics/psychometrics-reliability-d1-e0001", "title": "Reliability of a 5-item scale", "checks": 12, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Work Engagement Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d1-e0002", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "split": "eval", "seed": 10002, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-e0002", "title": "Reliable change for 6 clients", "checks": 15, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d1-e0003", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "split": "eval", "seed": 10003, "path": "tasks/psychometrics/psychometrics-scoring-d1-e0003", "title": "Score the Stress Checklist for 5 clients", "checks": 21, "instruction": "# Questionnaire scoring: Stress Checklist\n\n`responses.csv` holds the item responses of 5 clients to the Stress Checklist, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none)."} +{"id": "psychometrics-norms-d2-e0004", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "split": "eval", "seed": 10004, "path": "tasks/psychometrics/psychometrics-norms-d2-e0004", "title": "Norm-referenced scores for 8 clients", "checks": 25, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d2-e0005", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "split": "eval", "seed": 10005, "path": "tasks/psychometrics/psychometrics-reliability-d2-e0005", "title": "Reliability of a 7-item scale", "checks": 17, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Work Engagement Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d2-e0006", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "split": "eval", "seed": 10006, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-e0006", "title": "Reliable change for 8 clients", "checks": 33, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d2-e0007", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "split": "eval", "seed": 10007, "path": "tasks/psychometrics/psychometrics-scoring-d2-e0007", "title": "Score the Daily Strain Scale for 7 clients", "checks": 31, "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 7 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none)."} +{"id": "psychometrics-norms-d3-e0008", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "split": "eval", "seed": 10008, "path": "tasks/psychometrics/psychometrics-norms-d3-e0008", "title": "Norm-referenced scores for 5 clients", "checks": 38, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d3-e0009", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "split": "eval", "seed": 10009, "path": "tasks/psychometrics/psychometrics-reliability-d3-e0009", "title": "Reliability of a 8-item scale", "checks": 30, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 33 people to the 8 items of the Study Motivation Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d3-e0010", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "split": "eval", "seed": 10010, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-e0010", "title": "Reliable change for 6 clients", "checks": 43, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d3-e0011", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "split": "eval", "seed": 10011, "path": "tasks/psychometrics/psychometrics-scoring-d3-e0011", "title": "Score the Worry Questionnaire for 7 clients", "checks": 39, "instruction": "# Questionnaire scoring: Worry Questionnaire\n\n`responses.csv` holds the item responses of 7 clients to the Worry Questionnaire, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none)."} +{"id": "psychometrics-norms-d1-e0012", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 1, "split": "eval", "seed": 10012, "path": "tasks/psychometrics/psychometrics-norms-d1-e0012", "title": "Norm-referenced scores for 6 clients", "checks": 18, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Irritability Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d1-e0013", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 1, "split": "eval", "seed": 10013, "path": "tasks/psychometrics/psychometrics-reliability-d1-e0013", "title": "Reliability of a 5-item scale", "checks": 12, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 12 people to the 5 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q5`). Each value has\n - `mean`: the mean of the item, 2 decimals.\n - `variance`: the variance of the item scores, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 5-item scale, 3 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d1-e0014", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 1, "split": "eval", "seed": 10014, "path": "tasks/psychometrics/psychometrics-reliable-change-d1-e0014", "title": "Reliable change for 6 clients", "checks": 15, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on one instrument, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d1-e0015", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 1, "split": "eval", "seed": 10015, "path": "tasks/psychometrics/psychometrics-scoring-d1-e0015", "title": "Score the Daily Strain Scale for 5 clients", "checks": 21, "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 5 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer.\n - `total`: the total score, an integer.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none)."} +{"id": "psychometrics-norms-d2-e0016", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 2, "split": "eval", "seed": 10016, "path": "tasks/psychometrics/psychometrics-norms-d2-e0016", "title": "Norm-referenced scores for 8 clients", "checks": 25, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on the Fatigue Scale. `norms.csv` is the norm table and `norms_guide.md` says how to use it.\n\nConvert every raw score using the norm group that matches the client's age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d2-e0017", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 2, "split": "eval", "seed": 10017, "path": "tasks/psychometrics/psychometrics-reliability-d2-e0017", "title": "Reliability of a 7-item scale", "checks": 17, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 24 people to the 7 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q7`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 7-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d2-e0018", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 2, "split": "eval", "seed": 10018, "path": "tasks/psychometrics/psychometrics-reliable-change-d2-e0018", "title": "Reliable change for 8 clients", "checks": 35, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 8 clients on 2 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d2-e0019", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 2, "split": "eval", "seed": 10019, "path": "tasks/psychometrics/psychometrics-scoring-d2-e0019", "title": "Score the Daily Strain Scale for 7 clients", "checks": 34, "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 7 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none)."} +{"id": "psychometrics-norms-d3-e0020", "env": "psychometrics", "isced_f": "0313", "family": "norms", "difficulty": 3, "split": "eval", "seed": 10020, "path": "tasks/psychometrics/psychometrics-norms-d3-e0020", "title": "Norm-referenced scores for 5 clients", "checks": 38, "instruction": "# Norm-referenced scores\n\n`clients.csv` holds raw scores on 2 scales (one row per client and scale). `norms.csv` is the norm table and `norms_guide.md` says how to use it. The norm table also lists a scale that nobody here took.\n\nConvert every raw score using the norm group that matches the client's scale, age and sex.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id, for every client who has a norm group. Each value has\n - `age`: age in completed years on the test date, an integer.\n - `scales`: an object keyed by scale code, each with\n - `z`: the z score, 2 decimals.\n - `t_score`: the T score, 1 decimal.\n - `percentile`: the percentile rank, 1 decimal.\n - `range`: one of `very-high`, `high`, `average`, `low`.\n- `no_norm_group`: list of the client ids whose age is outside every age band (any order). Give no scores for them.\n- `high_or_above`: list of strings of the form `\":\"` for every score in the `high` or `very-high` range (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliability-d3-e0021", "env": "psychometrics", "isced_f": "0313", "family": "reliability", "difficulty": 3, "split": "eval", "seed": 10021, "path": "tasks/psychometrics/psychometrics-reliability-d3-e0021", "title": "Reliability of a 8-item scale", "checks": 30, "instruction": "# Reliability of a scale\n\n`item_responses.csv` holds the responses of 34 people to the 8 items of the Everyday Coping Scale, one row per respondent. `reliability_notes.md` gives the definitions to use, including which items are reverse-keyed and what to do with incomplete rows.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `items`: an object keyed by item name (`q1` to `q8`). Each value has\n - `variance`: the variance of the item scores, 3 decimals.\n - `item_rest_r`: the corrected item-total correlation, 3 decimals.\n - `alpha_if_deleted`: Cronbach's alpha of the scale without this item, 3 decimals.\n- `total_variance`: the variance of the respondents' totals, 3 decimals.\n- `alpha`: Cronbach's alpha of the 8-item scale, 3 decimals.\n- `weak_items`: list of the items whose corrected item-total correlation is below 0.30 (any order; an empty list if none).\n- `n_used`: the number of respondents kept in the analysis, an integer.\n- `best_item_to_drop`: the item with the highest alpha if item deleted.\n- `alpha_gain`: that item's alpha if item deleted minus `alpha`, 3 decimals (negative if dropping it would lower alpha).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-reliable-change-d3-e0022", "env": "psychometrics", "isced_f": "0313", "family": "reliable-change", "difficulty": 3, "split": "eval", "seed": 10022, "path": "tasks/psychometrics/psychometrics-reliable-change-d3-e0022", "title": "Reliable change for 6 clients", "checks": 41, "instruction": "# Outcome review: reliable change\n\n`outcomes.csv` holds pre-treatment and post-treatment scores for 6 clients on 3 instruments, in no particular order. `instruments.csv` gives each instrument's standard deviation, reliability and clinical cut-off. `rci_rules.md` gives the formula and the classification rules. Some clients left treatment early and have no post score on an instrument: give no result for those rows and list them in `no_post`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `instruments`: an object keyed by instrument code, for every instrument that appears in `outcomes.csv`. Each value has\n - `s_diff`: the standard error of the difference, 2 decimals.\n - `recovered_pct`: the percentage of the clients with both a pre and a post score on this instrument whose status is `recovered`, 1 decimal.\n- `results`: an object keyed by client id, then by instrument code. Each value has\n - `rci`: the reliable change index, 2 decimals, with its sign.\n - `status`: one of `recovered`, `improved`, `unchanged`, `deteriorated`.\n- `recovered`: list of strings of the form `\":\"` for every result with status `recovered` (any order; an empty list if none).\n- `deteriorated`: the same for status `deteriorated`.\n- `no_post`: list of `\":\"` strings for the rows without a post score (any order).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "psychometrics-scoring-d3-e0023", "env": "psychometrics", "isced_f": "0313", "family": "scoring", "difficulty": 3, "split": "eval", "seed": 10023, "path": "tasks/psychometrics/psychometrics-scoring-d3-e0023", "title": "Score the Daily Strain Scale for 7 clients", "checks": 39, "instruction": "# Questionnaire scoring: Daily Strain Scale\n\n`responses.csv` holds the item responses of 7 clients to the Daily Strain Scale, one row per administration, in no particular order. `scoring_manual.md` is the scoring manual: follow it exactly. Some clients filled in the questionnaire more than once: score only each client's most recent administration (the latest `administered` date).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `clients`: an object keyed by client id. Each value has\n - `subscales`: an object keyed by subscale code, giving each subscale score as an integer. Leave out a subscale that is not scorable.\n - `total`: the total score, an integer. Leave it out if it is not scorable.\n - `band`: the severity band, one of `minimal`, `mild`, `moderate`, `severe`. Leave it out if the total is not scorable.\n- `moderate_or_severe`: list of the client ids whose band is `moderate` or `severe` (any order; an empty list if none).\n- `unscorable`: list of strings of the form `\":\"`, one for every subscale that is not scorable (any order; an empty list if none).\n- `risk_flagged`: list of the client ids flagged on the risk item (any order; an empty list if none)."} +{"id": "seat-count-constituencies-d1-t0000", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "split": "train", "seed": 0, "path": "tasks/seat-count/seat-count-constituencies-d1-t0000", "title": "3 constituencies, 4 parties", "checks": 26, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d1-t0001", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "split": "train", "seed": 1, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0001", "title": "9 seats by sainte-lague", "checks": 16, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 9 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 9 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d1-t0002", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "split": "train", "seed": 2, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0002", "title": "10 seats by droop quota", "checks": 13, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 10 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d2-t0003", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "split": "train", "seed": 3, "path": "tasks/seat-count/seat-count-constituencies-d2-t0003", "title": "5 constituencies, 6 parties", "checks": 40, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d2-t0004", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "split": "train", "seed": 4, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0004", "title": "24 seats by dhondt", "checks": 20, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 24 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 24 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d2-t0005", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "split": "train", "seed": 5, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0005", "title": "15 seats by hare quota", "checks": 18, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 15 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 2% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d3-t0006", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "split": "train", "seed": 6, "path": "tasks/seat-count/seat-count-constituencies-d3-t0006", "title": "7 constituencies, 7 parties", "checks": 25, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 3% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.4, 3, 5, 7, ...: the first divisor is 1.4 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 58 fixed constituency seats there are 9 levelling seats, 67 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 67 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 67, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d3-t0007", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "split": "train", "seed": 7, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0007", "title": "44 seats by dhondt", "checks": 34, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 44 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 44 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were modified Sainte-Lague (divisors 1.4, 3, 5, 7, ...: the first divisor is 1.4 instead of 1) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d3-t0008", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "split": "train", "seed": 8, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0008", "title": "15 seats by hare quota", "checks": 30, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 15 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 3% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d1-t0009", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "split": "train", "seed": 9, "path": "tasks/seat-count/seat-count-constituencies-d1-t0009", "title": "3 constituencies, 4 parties", "checks": 26, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d1-t0010", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "split": "train", "seed": 10, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0010", "title": "8 seats by dhondt", "checks": 16, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 8 seats.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 8 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d1-t0011", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "split": "train", "seed": 11, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0011", "title": "12 seats by hare quota", "checks": 13, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 12 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d2-t0012", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "split": "train", "seed": 12, "path": "tasks/seat-count/seat-count-constituencies-d2-t0012", "title": "5 constituencies, 6 parties", "checks": 40, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d2-t0013", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "split": "train", "seed": 13, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0013", "title": "21 seats by dhondt", "checks": 20, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 21 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 21 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d2-t0014", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "split": "train", "seed": 14, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0014", "title": "12 seats by droop quota", "checks": 18, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 12 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 5% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d3-t0015", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "split": "train", "seed": 15, "path": "tasks/seat-count/seat-count-constituencies-d3-t0015", "title": "7 constituencies, 7 parties", "checks": 25, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 53 fixed constituency seats there are 4 levelling seats, 57 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 57 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 57, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d3-t0016", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "split": "train", "seed": 16, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0016", "title": "26 seats by sainte-lague", "checks": 34, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 26 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 26 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were D'Hondt (divisors 1, 2, 3, 4, ...) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d3-t0017", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "split": "train", "seed": 17, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0017", "title": "24 seats by hare quota", "checks": 30, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 24 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 4% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d1-t0018", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "split": "train", "seed": 18, "path": "tasks/seat-count/seat-count-constituencies-d1-t0018", "title": "3 constituencies, 4 parties", "checks": 26, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d1-t0019", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "split": "train", "seed": 19, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0019", "title": "12 seats by sainte-lague", "checks": 16, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 12 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 12 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d1-t0020", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "split": "train", "seed": 20, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0020", "title": "7 seats by hare quota", "checks": 13, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 7 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d2-t0021", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "split": "train", "seed": 21, "path": "tasks/seat-count/seat-count-constituencies-d2-t0021", "title": "5 constituencies, 6 parties", "checks": 40, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 3% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d2-t0022", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "split": "train", "seed": 22, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0022", "title": "31 seats by dhondt", "checks": 20, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 31 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 31 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d2-t0023", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "split": "train", "seed": 23, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0023", "title": "12 seats by droop quota", "checks": 18, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 12 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 3% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d3-t0024", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "split": "train", "seed": 24, "path": "tasks/seat-count/seat-count-constituencies-d3-t0024", "title": "7 constituencies, 7 parties", "checks": 25, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.4, 3, 5, 7, ...: the first divisor is 1.4 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 56 fixed constituency seats there are 7 levelling seats, 63 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 63 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 63, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d3-t0025", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "split": "train", "seed": 25, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0025", "title": "32 seats by dhondt", "checks": 34, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 32 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 32 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were Sainte-Lague (divisors 1, 3, 5, 7, ...) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d3-t0026", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "split": "train", "seed": 26, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0026", "title": "28 seats by hare quota", "checks": 30, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 28 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 5% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d1-t0027", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "split": "train", "seed": 27, "path": "tasks/seat-count/seat-count-constituencies-d1-t0027", "title": "3 constituencies, 4 parties", "checks": 26, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d1-t0028", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "split": "train", "seed": 28, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0028", "title": "10 seats by sainte-lague", "checks": 16, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 10 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 10 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d1-t0029", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "split": "train", "seed": 29, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0029", "title": "9 seats by hare quota", "checks": 13, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 9 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d2-t0030", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "split": "train", "seed": 30, "path": "tasks/seat-count/seat-count-constituencies-d2-t0030", "title": "5 constituencies, 6 parties", "checks": 40, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d2-t0031", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "split": "train", "seed": 31, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0031", "title": "26 seats by dhondt", "checks": 20, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 26 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 26 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d2-t0032", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "split": "train", "seed": 32, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0032", "title": "24 seats by hare quota", "checks": 18, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 24 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 2% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d3-t0033", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "split": "train", "seed": 33, "path": "tasks/seat-count/seat-count-constituencies-d3-t0033", "title": "7 constituencies, 7 parties", "checks": 25, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 55 fixed constituency seats there are 4 levelling seats, 59 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 59 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 59, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d3-t0034", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "split": "train", "seed": 34, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0034", "title": "21 seats by dhondt", "checks": 34, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 21 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 21 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were modified Sainte-Lague (divisors 1.4, 3, 5, 7, ...: the first divisor is 1.4 instead of 1) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d3-t0035", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "split": "train", "seed": 35, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0035", "title": "35 seats by droop quota", "checks": 30, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 35 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 3% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Hare quota, Q = V / S (not rounded) instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d1-t0036", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "split": "train", "seed": 36, "path": "tasks/seat-count/seat-count-constituencies-d1-t0036", "title": "3 constituencies, 4 parties", "checks": 26, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d1-t0037", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "split": "train", "seed": 37, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0037", "title": "11 seats by sainte-lague", "checks": 16, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 11 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 11 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d1-t0038", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "split": "train", "seed": 38, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0038", "title": "7 seats by droop quota", "checks": 13, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 7 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d2-t0039", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "split": "train", "seed": 39, "path": "tasks/seat-count/seat-count-constituencies-d2-t0039", "title": "5 constituencies, 6 parties", "checks": 40, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d2-t0040", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "split": "train", "seed": 40, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0040", "title": "29 seats by dhondt", "checks": 20, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 29 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 29 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d2-t0041", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "split": "train", "seed": 41, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0041", "title": "24 seats by hare quota", "checks": 18, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 24 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 3% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d3-t0042", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "split": "train", "seed": 42, "path": "tasks/seat-count/seat-count-constituencies-d3-t0042", "title": "7 constituencies, 7 parties", "checks": 25, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 64 fixed constituency seats there are 5 levelling seats, 69 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 69 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 69, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d3-t0043", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "split": "train", "seed": 43, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0043", "title": "43 seats by sainte-lague", "checks": 34, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 43 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 43 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d3-t0044", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "split": "train", "seed": 44, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0044", "title": "36 seats by hare quota", "checks": 30, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 36 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 5% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d1-t0045", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "split": "train", "seed": 45, "path": "tasks/seat-count/seat-count-constituencies-d1-t0045", "title": "3 constituencies, 4 parties", "checks": 26, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d1-t0046", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "split": "train", "seed": 46, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0046", "title": "11 seats by sainte-lague", "checks": 16, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 11 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 11 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d1-t0047", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "split": "train", "seed": 47, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0047", "title": "8 seats by hare quota", "checks": 13, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 8 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d2-t0048", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "split": "train", "seed": 48, "path": "tasks/seat-count/seat-count-constituencies-d2-t0048", "title": "5 constituencies, 6 parties", "checks": 40, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d2-t0049", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "split": "train", "seed": 49, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0049", "title": "21 seats by sainte-lague", "checks": 20, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 21 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 21 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d2-t0050", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "split": "train", "seed": 50, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0050", "title": "26 seats by droop quota", "checks": 18, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 26 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 2% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d3-t0051", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "split": "train", "seed": 51, "path": "tasks/seat-count/seat-count-constituencies-d3-t0051", "title": "7 constituencies, 7 parties", "checks": 25, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 51 fixed constituency seats there are 4 levelling seats, 55 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 55 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 55, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d3-t0052", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "split": "train", "seed": 52, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0052", "title": "21 seats by sainte-lague", "checks": 34, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 21 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 21 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were D'Hondt (divisors 1, 2, 3, 4, ...) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d3-t0053", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "split": "train", "seed": 53, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0053", "title": "34 seats by droop quota", "checks": 30, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 34 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 5% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Hare quota, Q = V / S (not rounded) instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d1-t0054", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "split": "train", "seed": 54, "path": "tasks/seat-count/seat-count-constituencies-d1-t0054", "title": "3 constituencies, 4 parties", "checks": 26, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d1-t0055", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "split": "train", "seed": 55, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0055", "title": "10 seats by sainte-lague", "checks": 16, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 10 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 10 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d1-t0056", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "split": "train", "seed": 56, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0056", "title": "14 seats by hare quota", "checks": 13, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 14 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d2-t0057", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "split": "train", "seed": 57, "path": "tasks/seat-count/seat-count-constituencies-d2-t0057", "title": "5 constituencies, 6 parties", "checks": 40, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 3% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d2-t0058", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "split": "train", "seed": 58, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0058", "title": "29 seats by modified-sainte-lague", "checks": 20, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 29 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 29 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d2-t0059", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "split": "train", "seed": 59, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0059", "title": "18 seats by hare quota", "checks": 18, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 18 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 4% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d3-t0060", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "split": "train", "seed": 60, "path": "tasks/seat-count/seat-count-constituencies-d3-t0060", "title": "7 constituencies, 7 parties", "checks": 25, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 46 fixed constituency seats there are 7 levelling seats, 53 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 53 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 53, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d3-t0061", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "split": "train", "seed": 61, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0061", "title": "31 seats by sainte-lague", "checks": 34, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 31 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 31 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were D'Hondt (divisors 1, 2, 3, 4, ...) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d3-t0062", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "split": "train", "seed": 62, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0062", "title": "29 seats by hare quota", "checks": 30, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 29 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 5% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d1-t0063", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "split": "train", "seed": 63, "path": "tasks/seat-count/seat-count-constituencies-d1-t0063", "title": "3 constituencies, 4 parties", "checks": 26, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d1-t0064", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "split": "train", "seed": 64, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0064", "title": "13 seats by sainte-lague", "checks": 16, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 13 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 13 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d1-t0065", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "split": "train", "seed": 65, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0065", "title": "10 seats by droop quota", "checks": 13, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 10 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d2-t0066", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "split": "train", "seed": 66, "path": "tasks/seat-count/seat-count-constituencies-d2-t0066", "title": "5 constituencies, 6 parties", "checks": 40, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d2-t0067", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "split": "train", "seed": 67, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0067", "title": "16 seats by sainte-lague", "checks": 20, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 16 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 16 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d2-t0068", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "split": "train", "seed": 68, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0068", "title": "19 seats by droop quota", "checks": 18, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 19 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 3% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d3-t0069", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "split": "train", "seed": 69, "path": "tasks/seat-count/seat-count-constituencies-d3-t0069", "title": "7 constituencies, 7 parties", "checks": 25, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 3% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 60 fixed constituency seats there are 9 levelling seats, 69 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 69 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 69, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d3-t0070", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "split": "train", "seed": 70, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0070", "title": "36 seats by dhondt", "checks": 34, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 36 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 36 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d3-t0071", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "split": "train", "seed": 71, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0071", "title": "23 seats by droop quota", "checks": 30, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 23 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 2% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Hare quota, Q = V / S (not rounded) instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d1-t0072", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "split": "train", "seed": 72, "path": "tasks/seat-count/seat-count-constituencies-d1-t0072", "title": "3 constituencies, 4 parties", "checks": 26, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d1-t0073", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "split": "train", "seed": 73, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0073", "title": "11 seats by sainte-lague", "checks": 16, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 11 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 11 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d1-t0074", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "split": "train", "seed": 74, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0074", "title": "10 seats by droop quota", "checks": 13, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 10 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d2-t0075", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "split": "train", "seed": 75, "path": "tasks/seat-count/seat-count-constituencies-d2-t0075", "title": "5 constituencies, 6 parties", "checks": 40, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 5% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d2-t0076", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "split": "train", "seed": 76, "path": "tasks/seat-count/seat-count-highest-averages-d2-t0076", "title": "18 seats by dhondt", "checks": 20, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 18 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 18 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d2-t0077", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "split": "train", "seed": 77, "path": "tasks/seat-count/seat-count-largest-remainder-d2-t0077", "title": "20 seats by droop quota", "checks": 18, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 20 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 2% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d3-t0078", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "split": "train", "seed": 78, "path": "tasks/seat-count/seat-count-constituencies-d3-t0078", "title": "7 constituencies, 7 parties", "checks": 25, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.4, 3, 5, 7, ...: the first divisor is 1.4 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 64 fixed constituency seats there are 7 levelling seats, 71 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 71 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 71, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d3-t0079", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "split": "train", "seed": 79, "path": "tasks/seat-count/seat-count-highest-averages-d3-t0079", "title": "39 seats by modified-sainte-lague", "checks": 34, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 39 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.4, 3, 5, 7, ...: the first divisor is 1.4 instead of 1). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 39 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were Sainte-Lague (divisors 1, 3, 5, 7, ...) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d3-t0080", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "split": "train", "seed": 80, "path": "tasks/seat-count/seat-count-largest-remainder-d3-t0080", "title": "22 seats by hare quota", "checks": 30, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 22 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 3% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d1-t0081", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "split": "train", "seed": 81, "path": "tasks/seat-count/seat-count-constituencies-d1-t0081", "title": "3 constituencies, 4 parties", "checks": 26, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d1-t0082", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "split": "train", "seed": 82, "path": "tasks/seat-count/seat-count-highest-averages-d1-t0082", "title": "7 seats by sainte-lague", "checks": 16, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 7 seats.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 7 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d1-t0083", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "split": "train", "seed": 83, "path": "tasks/seat-count/seat-count-largest-remainder-d1-t0083", "title": "9 seats by hare quota", "checks": 13, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 9 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d1-e0000", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "split": "eval", "seed": 10000, "path": "tasks/seat-count/seat-count-constituencies-d1-e0000", "title": "3 constituencies, 4 parties", "checks": 26, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d1-e0001", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "split": "eval", "seed": 10001, "path": "tasks/seat-count/seat-count-highest-averages-d1-e0001", "title": "7 seats by dhondt", "checks": 16, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 7 seats.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 7 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d1-e0002", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "split": "eval", "seed": 10002, "path": "tasks/seat-count/seat-count-largest-remainder-d1-e0002", "title": "9 seats by hare quota", "checks": 13, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 9 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d2-e0003", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "split": "eval", "seed": 10003, "path": "tasks/seat-count/seat-count-constituencies-d2-e0003", "title": "5 constituencies, 6 parties", "checks": 40, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 3% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d2-e0004", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "split": "eval", "seed": 10004, "path": "tasks/seat-count/seat-count-highest-averages-d2-e0004", "title": "17 seats by modified-sainte-lague", "checks": 20, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 17 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 17 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d2-e0005", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "split": "eval", "seed": 10005, "path": "tasks/seat-count/seat-count-largest-remainder-d2-e0005", "title": "12 seats by droop quota", "checks": 18, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 12 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 4% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d3-e0006", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "split": "eval", "seed": 10006, "path": "tasks/seat-count/seat-count-constituencies-d3-e0006", "title": "7 constituencies, 7 parties", "checks": 25, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.4, 3, 5, 7, ...: the first divisor is 1.4 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 57 fixed constituency seats there are 4 levelling seats, 61 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 61 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 61, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d3-e0007", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "split": "eval", "seed": 10007, "path": "tasks/seat-count/seat-count-highest-averages-d3-e0007", "title": "47 seats by dhondt", "checks": 34, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 47 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 47 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were Sainte-Lague (divisors 1, 3, 5, 7, ...) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d3-e0008", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "split": "eval", "seed": 10008, "path": "tasks/seat-count/seat-count-largest-remainder-d3-e0008", "title": "15 seats by hare quota", "checks": 30, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 15 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 5% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d1-e0009", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "split": "eval", "seed": 10009, "path": "tasks/seat-count/seat-count-constituencies-d1-e0009", "title": "3 constituencies, 4 parties", "checks": 26, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d1-e0010", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "split": "eval", "seed": 10010, "path": "tasks/seat-count/seat-count-highest-averages-d1-e0010", "title": "13 seats by dhondt", "checks": 16, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 13 seats.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 3% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 13 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d1-e0011", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "split": "eval", "seed": 10011, "path": "tasks/seat-count/seat-count-largest-remainder-d1-e0011", "title": "7 seats by hare quota", "checks": 13, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 7 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d2-e0012", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "split": "eval", "seed": 10012, "path": "tasks/seat-count/seat-count-constituencies-d2-e0012", "title": "5 constituencies, 6 parties", "checks": 40, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d2-e0013", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "split": "eval", "seed": 10013, "path": "tasks/seat-count/seat-count-highest-averages-d2-e0013", "title": "18 seats by dhondt", "checks": 20, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 18 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 18 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d2-e0014", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "split": "eval", "seed": 10014, "path": "tasks/seat-count/seat-count-largest-remainder-d2-e0014", "title": "17 seats by droop quota", "checks": 18, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 17 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 2% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d3-e0015", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 3, "split": "eval", "seed": 10015, "path": "tasks/seat-count/seat-count-constituencies-d3-e0015", "title": "7 constituencies, 7 parties", "checks": 25, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nOn top of the 51 fixed constituency seats there are 4 levelling seats, 55 seats in all. They are shared out like this:\n\n1. Allocate the fixed seats in each constituency as described above.\n2. Allocate all 55 seats among the qualifying parties by their national votes, with the same method. This is each party's entitlement.\n3. If a party has won more fixed seats than its entitlement, it keeps its fixed seats and gets no levelling seats. Set every such party aside, take its fixed seats off the 55, and repeat step 2 for the remaining parties and the remaining seats. Repeat until no remaining party has more fixed seats than its entitlement.\n4. Each remaining party gets levelling seats equal to its entitlement minus its fixed seats.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `fixed_seats`: object keyed by party: fixed seats summed over the constituencies, an integer for every party (0 if none).\n- `levelling_seats`: object keyed by party: levelling seats, an integer for every party (0 if none).\n- `total_seats`: object keyed by party: fixed plus levelling seats.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats (fixed plus levelling). Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d3-e0016", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 3, "split": "eval", "seed": 10016, "path": "tasks/seat-count/seat-count-highest-averages-d3-e0016", "title": "32 seats by sainte-lague", "checks": 34, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 7 counting districts in an election for 32 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 32 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n- `comparison_seats`: object keyed by party: the seats each party would get if the method were modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1) instead, with the same threshold.\n- `changed`: list of the parties whose seat count differs between the two methods (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d3-e0017", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 3, "split": "eval", "seed": 10017, "path": "tasks/seat-count/seat-count-largest-remainder-d3-e0017", "title": "24 seats by hare quota", "checks": 30, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 6 counting districts in an election for 24 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 2% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n- `comparison_quota`: the quota if the election used the Droop quota, Q = floor(V / (S + 1)) + 1 instead, 2 decimals.\n- `comparison_seats`: object keyed by party: total seats under that other quota, with the same threshold.\n- `changed`: list of the parties whose total differs between the two quotas (any order; an empty list if none).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d1-e0018", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 1, "split": "eval", "seed": 10018, "path": "tasks/seat-count/seat-count-constituencies-d1-e0018", "title": "3 constituencies, 4 parties", "checks": 26, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `vote_share_percent`: object keyed by party: share of the national valid votes in per cent, 2 decimals.\n- `seat_share_percent`: object keyed by party: share of all seats in per cent, 2 decimals.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d1-e0019", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 1, "split": "eval", "seed": 10019, "path": "tasks/seat-count/seat-count-highest-averages-d1-e0019", "title": "12 seats by dhondt", "checks": 16, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the votes for each party in an election for 12 seats.\n\nThe seats are allocated by the highest-averages method D'Hondt (divisors 1, 2, 3, 4, ...). A party takes part in the allocation only if it has at least 5% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 12 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d1-e0020", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 1, "split": "eval", "seed": 10020, "path": "tasks/seat-count/seat-count-largest-remainder-d1-e0020", "title": "9 seats by hare quota", "checks": 13, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the votes for each party in an election for 9 seats. Every party takes part in the allocation.\n\nThe seats are allocated by the largest-remainder method with the Hare quota, Q = V / S (not rounded). S is the number of seats and V is the total vote of the parties that take part in the allocation. The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-constituencies-d2-e0021", "env": "seat-count", "isced_f": "0312", "family": "constituencies", "difficulty": 2, "split": "eval", "seed": 10021, "path": "tasks/seat-count/seat-count-constituencies-d2-e0021", "title": "5 constituencies, 6 parties", "checks": 40, "instruction": "# Seat count: constituencies\n\n`votes.csv` gives the votes by constituency and party, in no particular order, and `constituencies.csv` gives the number of seats filled in each constituency. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share. A party takes part in the allocation, in every constituency, only if it has at least 4% of the valid votes in the whole country. A party with no row in a constituency did not stand there and has no votes there.\n\nWithin each constituency the seats are allocated by the highest-averages method Sainte-Lague (divisors 1, 3, 5, 7, ...): divide each qualifying party's votes in the constituency by each divisor in turn; the largest quotients, as many as the constituency has seats, win one seat each. The settings are also in `election.json`.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes in the whole country, an integer.\n- `turnout_percent`: all ballots cast in the country (valid, blank and invalid) as a percentage of all registered voters (`registered_voters` in `constituencies.csv`), 2 decimals.\n- `qualified`: list of the parties that reach the national threshold (any order).\n- `constituency_seats`: object keyed by constituency, each an object keyed by party with the seats won there, an integer (0 where a party wins none; list every party in every constituency).\n- `national_seats`: object keyed by party: seats summed over the constituencies.\n- `gallagher_index`: the Gallagher least-squares index of disproportionality, sqrt(0.5 x sum of (v - s)^2), 2 decimals. For each party v is its percentage of the national valid votes and s is its percentage of all seats. Include every party on the ballot as its own term, also those with no seats; blank and invalid ballots are not a party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-highest-averages-d2-e0022", "env": "seat-count", "isced_f": "0312", "family": "highest-averages", "difficulty": 2, "split": "eval", "seed": 10022, "path": "tasks/seat-count/seat-count-highest-averages-d2-e0022", "title": "15 seats by modified-sainte-lague", "checks": 20, "instruction": "# Seat count: highest averages\n\n`results.csv` gives the count from 4 counting districts in an election for 15 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nThe seats are allocated by the highest-averages method modified Sainte-Lague (divisors 1.2, 3, 5, 7, ...: the first divisor is 1.2 instead of 1). A party takes part in the allocation only if it has at least 4% of the valid votes. These settings are also in `election.json`.\n\nHow the method works: divide each qualifying party's votes by each divisor in turn. The 15 largest quotients over all parties win one seat each.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `vote_share_percent`: object keyed by party: each party's share of the valid votes in per cent, 2 decimals (every party, also those under the threshold).\n- `qualified`: list of the parties that reach the threshold (any order).\n- `seats`: object keyed by party: seats won, an integer (0 for parties with none, including those under the threshold).\n- `last_seat_party`: the party that wins the last seat, that is the party holding the smallest winning quotient.\n- `last_winning_quotient`: that quotient, 2 decimals.\n- `runner_up_party`: the party holding the largest quotient that does not win a seat.\n- `first_losing_quotient`: that quotient, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "seat-count-largest-remainder-d2-e0023", "env": "seat-count", "isced_f": "0312", "family": "largest-remainder", "difficulty": 2, "split": "eval", "seed": 10023, "path": "tasks/seat-count/seat-count-largest-remainder-d2-e0023", "title": "24 seats by droop quota", "checks": 18, "instruction": "# Seat count: largest remainder\n\n`count.csv` gives the count from 4 counting districts in an election for 24 seats, in no particular order. Add the districts together. Rows whose `party` is `BLANK` or `INVALID` are ballots that are not valid votes: leave them out of the valid votes and of every share.\n\nA party takes part in the allocation only if it has at least 3% of the valid votes.\n\nThe seats are allocated by the largest-remainder method with the Droop quota, Q = floor(V / (S + 1)) + 1. S is the number of seats and V is the total vote of the parties that take part in the allocation (votes for parties under the threshold are not part of V). The settings are also in `election.json`.\n\nHow the method works: each party first gets one seat for every whole quota in its vote, floor(votes / Q). The seats still unfilled go, one each, to the parties with the largest remainders, votes - (automatic seats x Q).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `valid_votes`: total valid votes, an integer.\n- `qualified`: list of the parties that reach the threshold (any order).\n- `quota`: the quota Q, 2 decimals.\n- `automatic_seats`: object keyed by party: seats won by whole quotas, an integer (0 for parties with none, including those under the threshold).\n- `remainder_seat_parties`: list of the parties that win a remainder seat (any order).\n- `seats`: object keyed by party: total seats, an integer for every party.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d1-t0000", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "split": "train", "seed": 0, "path": "tasks/stand-inventory/stand-inventory-growth-d1-t0000", "title": "Increment for 4 stands", "checks": 9, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d1-t0001", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "split": "train", "seed": 1, "path": "tasks/stand-inventory/stand-inventory-plots-d1-t0001", "title": "Sample plot summary for 3 plots", "checks": 15, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Tallheden 4. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d1-t0002", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "split": "train", "seed": 2, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-t0002", "title": "Thinning from below on a 400 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Storskogen 31. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d1-t0003", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "split": "train", "seed": 3, "path": "tasks/stand-inventory/stand-inventory-volume-d1-t0003", "title": "Stand volume from 1 plot", "checks": 6, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Storskogen 31. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d2-t0004", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "split": "train", "seed": 4, "path": "tasks/stand-inventory/stand-inventory-growth-d2-t0004", "title": "Increment for 6 stands", "checks": 13, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d2-t0005", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "split": "train", "seed": 5, "path": "tasks/stand-inventory/stand-inventory-plots-d2-t0005", "title": "Sample plot summary for 5 plots", "checks": 24, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Langtjarn 5. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d2-t0006", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "split": "train", "seed": 6, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-t0006", "title": "Thinning from below on a 400 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Langtjarn 5. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d2-t0007", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "split": "train", "seed": 7, "path": "tasks/stand-inventory/stand-inventory-volume-d2-t0007", "title": "Stand volume from 3 plots", "checks": 9, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Granliden 27. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d3-t0008", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "split": "train", "seed": 8, "path": "tasks/stand-inventory/stand-inventory-growth-d3-t0008", "title": "Increment for 8 stands", "checks": 33, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d3-t0009", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "split": "train", "seed": 9, "path": "tasks/stand-inventory/stand-inventory-plots-d3-t0009", "title": "Sample plot summary for 7 plots", "checks": 36, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Kvarnmon 16. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d3-t0010", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "split": "train", "seed": 10, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-t0010", "title": "Thinning from below on a 400 m2 plot", "checks": 11, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Norrmyran 12. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d3-t0011", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "split": "train", "seed": 11, "path": "tasks/stand-inventory/stand-inventory-volume-d3-t0011", "title": "Stand volume from 4 plots", "checks": 12, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Kvarnmon 16. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d1-t0012", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "split": "train", "seed": 12, "path": "tasks/stand-inventory/stand-inventory-growth-d1-t0012", "title": "Increment for 4 stands", "checks": 9, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d1-t0013", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "split": "train", "seed": 13, "path": "tasks/stand-inventory/stand-inventory-plots-d1-t0013", "title": "Sample plot summary for 3 plots", "checks": 15, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Ravasen 22. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d1-t0014", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "split": "train", "seed": 14, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-t0014", "title": "Thinning from below on a 400 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Langtjarn 5. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d1-t0015", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "split": "train", "seed": 15, "path": "tasks/stand-inventory/stand-inventory-volume-d1-t0015", "title": "Stand volume from 1 plot", "checks": 8, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Norrmyran 12. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d2-t0016", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "split": "train", "seed": 16, "path": "tasks/stand-inventory/stand-inventory-growth-d2-t0016", "title": "Increment for 6 stands", "checks": 13, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d2-t0017", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "split": "train", "seed": 17, "path": "tasks/stand-inventory/stand-inventory-plots-d2-t0017", "title": "Sample plot summary for 5 plots", "checks": 24, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Tallheden 4. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d2-t0018", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "split": "train", "seed": 18, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-t0018", "title": "Thinning from below on a 400 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Granliden 27. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d2-t0019", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "split": "train", "seed": 19, "path": "tasks/stand-inventory/stand-inventory-volume-d2-t0019", "title": "Stand volume from 3 plots", "checks": 9, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Storskogen 31. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d3-t0020", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "split": "train", "seed": 20, "path": "tasks/stand-inventory/stand-inventory-growth-d3-t0020", "title": "Increment for 8 stands", "checks": 33, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d3-t0021", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "split": "train", "seed": 21, "path": "tasks/stand-inventory/stand-inventory-plots-d3-t0021", "title": "Sample plot summary for 7 plots", "checks": 36, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Bjorkbacken 8. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d3-t0022", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "split": "train", "seed": 22, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-t0022", "title": "Thinning from below on a 400 m2 plot", "checks": 11, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Bjorkbacken 8. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d3-t0023", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "split": "train", "seed": 23, "path": "tasks/stand-inventory/stand-inventory-volume-d3-t0023", "title": "Stand volume from 4 plots", "checks": 12, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Norrmyran 12. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d1-t0024", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "split": "train", "seed": 24, "path": "tasks/stand-inventory/stand-inventory-growth-d1-t0024", "title": "Increment for 4 stands", "checks": 9, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d1-t0025", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "split": "train", "seed": 25, "path": "tasks/stand-inventory/stand-inventory-plots-d1-t0025", "title": "Sample plot summary for 3 plots", "checks": 15, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Storskogen 31. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d1-t0026", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "split": "train", "seed": 26, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-t0026", "title": "Thinning from below on a 400 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Norrmyran 12. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d1-t0027", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "split": "train", "seed": 27, "path": "tasks/stand-inventory/stand-inventory-volume-d1-t0027", "title": "Stand volume from 1 plot", "checks": 8, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Ravasen 22. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d2-t0028", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "split": "train", "seed": 28, "path": "tasks/stand-inventory/stand-inventory-growth-d2-t0028", "title": "Increment for 6 stands", "checks": 13, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d2-t0029", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "split": "train", "seed": 29, "path": "tasks/stand-inventory/stand-inventory-plots-d2-t0029", "title": "Sample plot summary for 5 plots", "checks": 24, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Norrmyran 12. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d2-t0030", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "split": "train", "seed": 30, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-t0030", "title": "Thinning from below on a 500 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Langtjarn 5. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d2-t0031", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "split": "train", "seed": 31, "path": "tasks/stand-inventory/stand-inventory-volume-d2-t0031", "title": "Stand volume from 3 plots", "checks": 9, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Kvarnmon 16. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d3-t0032", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "split": "train", "seed": 32, "path": "tasks/stand-inventory/stand-inventory-growth-d3-t0032", "title": "Increment for 8 stands", "checks": 33, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d3-t0033", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "split": "train", "seed": 33, "path": "tasks/stand-inventory/stand-inventory-plots-d3-t0033", "title": "Sample plot summary for 7 plots", "checks": 36, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Langtjarn 5. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d3-t0034", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "split": "train", "seed": 34, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-t0034", "title": "Thinning from below on a 600 m2 plot", "checks": 10, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Ravasen 22. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d3-t0035", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "split": "train", "seed": 35, "path": "tasks/stand-inventory/stand-inventory-volume-d3-t0035", "title": "Stand volume from 4 plots", "checks": 12, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Langtjarn 5. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d1-t0036", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "split": "train", "seed": 36, "path": "tasks/stand-inventory/stand-inventory-growth-d1-t0036", "title": "Increment for 4 stands", "checks": 9, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d1-t0037", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "split": "train", "seed": 37, "path": "tasks/stand-inventory/stand-inventory-plots-d1-t0037", "title": "Sample plot summary for 3 plots", "checks": 15, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Ravasen 22. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d1-t0038", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "split": "train", "seed": 38, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-t0038", "title": "Thinning from below on a 400 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Bjorkbacken 8. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d1-t0039", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "split": "train", "seed": 39, "path": "tasks/stand-inventory/stand-inventory-volume-d1-t0039", "title": "Stand volume from 1 plot", "checks": 6, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Tallheden 4. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d2-t0040", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "split": "train", "seed": 40, "path": "tasks/stand-inventory/stand-inventory-growth-d2-t0040", "title": "Increment for 6 stands", "checks": 13, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d2-t0041", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "split": "train", "seed": 41, "path": "tasks/stand-inventory/stand-inventory-plots-d2-t0041", "title": "Sample plot summary for 5 plots", "checks": 24, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Granliden 27. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d2-t0042", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "split": "train", "seed": 42, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-t0042", "title": "Thinning from below on a 400 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Bjorkbacken 8. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d2-t0043", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "split": "train", "seed": 43, "path": "tasks/stand-inventory/stand-inventory-volume-d2-t0043", "title": "Stand volume from 3 plots", "checks": 9, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Bjorkbacken 8. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d3-t0044", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "split": "train", "seed": 44, "path": "tasks/stand-inventory/stand-inventory-growth-d3-t0044", "title": "Increment for 8 stands", "checks": 33, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d3-t0045", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "split": "train", "seed": 45, "path": "tasks/stand-inventory/stand-inventory-plots-d3-t0045", "title": "Sample plot summary for 7 plots", "checks": 36, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Ravasen 22. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d3-t0046", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "split": "train", "seed": 46, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-t0046", "title": "Thinning from below on a 500 m2 plot", "checks": 10, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Langtjarn 5. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d3-t0047", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "split": "train", "seed": 47, "path": "tasks/stand-inventory/stand-inventory-volume-d3-t0047", "title": "Stand volume from 4 plots", "checks": 12, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Langtjarn 5. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d1-t0048", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "split": "train", "seed": 48, "path": "tasks/stand-inventory/stand-inventory-growth-d1-t0048", "title": "Increment for 4 stands", "checks": 9, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d1-t0049", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "split": "train", "seed": 49, "path": "tasks/stand-inventory/stand-inventory-plots-d1-t0049", "title": "Sample plot summary for 3 plots", "checks": 15, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Granliden 27. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d1-t0050", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "split": "train", "seed": 50, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-t0050", "title": "Thinning from below on a 500 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Norrmyran 12. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d1-t0051", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "split": "train", "seed": 51, "path": "tasks/stand-inventory/stand-inventory-volume-d1-t0051", "title": "Stand volume from 1 plot", "checks": 6, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Bjorkbacken 8. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d2-t0052", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "split": "train", "seed": 52, "path": "tasks/stand-inventory/stand-inventory-growth-d2-t0052", "title": "Increment for 6 stands", "checks": 13, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d2-t0053", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "split": "train", "seed": 53, "path": "tasks/stand-inventory/stand-inventory-plots-d2-t0053", "title": "Sample plot summary for 5 plots", "checks": 24, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Tallheden 4. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d2-t0054", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "split": "train", "seed": 54, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-t0054", "title": "Thinning from below on a 800 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Ravasen 22. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d2-t0055", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "split": "train", "seed": 55, "path": "tasks/stand-inventory/stand-inventory-volume-d2-t0055", "title": "Stand volume from 3 plots", "checks": 9, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Langtjarn 5. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d3-t0056", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "split": "train", "seed": 56, "path": "tasks/stand-inventory/stand-inventory-growth-d3-t0056", "title": "Increment for 8 stands", "checks": 33, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d3-t0057", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "split": "train", "seed": 57, "path": "tasks/stand-inventory/stand-inventory-plots-d3-t0057", "title": "Sample plot summary for 7 plots", "checks": 36, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Norrmyran 12. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d3-t0058", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "split": "train", "seed": 58, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-t0058", "title": "Thinning from below on a 600 m2 plot", "checks": 11, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Langtjarn 5. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d3-t0059", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "split": "train", "seed": 59, "path": "tasks/stand-inventory/stand-inventory-volume-d3-t0059", "title": "Stand volume from 4 plots", "checks": 12, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Langtjarn 5. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d1-t0060", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "split": "train", "seed": 60, "path": "tasks/stand-inventory/stand-inventory-growth-d1-t0060", "title": "Increment for 4 stands", "checks": 9, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d1-t0061", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "split": "train", "seed": 61, "path": "tasks/stand-inventory/stand-inventory-plots-d1-t0061", "title": "Sample plot summary for 3 plots", "checks": 15, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Kvarnmon 16. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d1-t0062", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "split": "train", "seed": 62, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-t0062", "title": "Thinning from below on a 500 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Ravasen 22. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d1-t0063", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "split": "train", "seed": 63, "path": "tasks/stand-inventory/stand-inventory-volume-d1-t0063", "title": "Stand volume from 1 plot", "checks": 8, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Kvarnmon 16. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d2-t0064", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "split": "train", "seed": 64, "path": "tasks/stand-inventory/stand-inventory-growth-d2-t0064", "title": "Increment for 6 stands", "checks": 13, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d2-t0065", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "split": "train", "seed": 65, "path": "tasks/stand-inventory/stand-inventory-plots-d2-t0065", "title": "Sample plot summary for 5 plots", "checks": 24, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Langtjarn 5. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d2-t0066", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "split": "train", "seed": 66, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-t0066", "title": "Thinning from below on a 600 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Storskogen 31. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d2-t0067", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "split": "train", "seed": 67, "path": "tasks/stand-inventory/stand-inventory-volume-d2-t0067", "title": "Stand volume from 3 plots", "checks": 9, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Storskogen 31. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d3-t0068", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "split": "train", "seed": 68, "path": "tasks/stand-inventory/stand-inventory-growth-d3-t0068", "title": "Increment for 8 stands", "checks": 33, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d3-t0069", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "split": "train", "seed": 69, "path": "tasks/stand-inventory/stand-inventory-plots-d3-t0069", "title": "Sample plot summary for 7 plots", "checks": 36, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Norrmyran 12. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d3-t0070", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "split": "train", "seed": 70, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-t0070", "title": "Thinning from below on a 500 m2 plot", "checks": 10, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Ravasen 22. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d3-t0071", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "split": "train", "seed": 71, "path": "tasks/stand-inventory/stand-inventory-volume-d3-t0071", "title": "Stand volume from 4 plots", "checks": 12, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Kvarnmon 16. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d1-t0072", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "split": "train", "seed": 72, "path": "tasks/stand-inventory/stand-inventory-growth-d1-t0072", "title": "Increment for 4 stands", "checks": 9, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d1-t0073", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "split": "train", "seed": 73, "path": "tasks/stand-inventory/stand-inventory-plots-d1-t0073", "title": "Sample plot summary for 3 plots", "checks": 15, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Bjorkbacken 8. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d1-t0074", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "split": "train", "seed": 74, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-t0074", "title": "Thinning from below on a 400 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Granliden 27. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d1-t0075", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "split": "train", "seed": 75, "path": "tasks/stand-inventory/stand-inventory-volume-d1-t0075", "title": "Stand volume from 1 plot", "checks": 6, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Bjorkbacken 8. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d2-t0076", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "split": "train", "seed": 76, "path": "tasks/stand-inventory/stand-inventory-growth-d2-t0076", "title": "Increment for 6 stands", "checks": 13, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d2-t0077", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "split": "train", "seed": 77, "path": "tasks/stand-inventory/stand-inventory-plots-d2-t0077", "title": "Sample plot summary for 5 plots", "checks": 24, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Kvarnmon 16. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d2-t0078", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "split": "train", "seed": 78, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-t0078", "title": "Thinning from below on a 500 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Granliden 27. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d2-t0079", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "split": "train", "seed": 79, "path": "tasks/stand-inventory/stand-inventory-volume-d2-t0079", "title": "Stand volume from 3 plots", "checks": 9, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Tallheden 4. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d3-t0080", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "split": "train", "seed": 80, "path": "tasks/stand-inventory/stand-inventory-growth-d3-t0080", "title": "Increment for 8 stands", "checks": 33, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d3-t0081", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "split": "train", "seed": 81, "path": "tasks/stand-inventory/stand-inventory-plots-d3-t0081", "title": "Sample plot summary for 7 plots", "checks": 36, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Ravasen 22. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d3-t0082", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "split": "train", "seed": 82, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-t0082", "title": "Thinning from below on a 400 m2 plot", "checks": 11, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Bjorkbacken 8. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d3-t0083", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "split": "train", "seed": 83, "path": "tasks/stand-inventory/stand-inventory-volume-d3-t0083", "title": "Stand volume from 4 plots", "checks": 12, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Kvarnmon 16. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d1-e0000", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "split": "eval", "seed": 10000, "path": "tasks/stand-inventory/stand-inventory-growth-d1-e0000", "title": "Increment for 4 stands", "checks": 9, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d1-e0001", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "split": "eval", "seed": 10001, "path": "tasks/stand-inventory/stand-inventory-plots-d1-e0001", "title": "Sample plot summary for 3 plots", "checks": 15, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Tallheden 4. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d1-e0002", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "split": "eval", "seed": 10002, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-e0002", "title": "Thinning from below on a 400 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Kvarnmon 16. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d1-e0003", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "split": "eval", "seed": 10003, "path": "tasks/stand-inventory/stand-inventory-volume-d1-e0003", "title": "Stand volume from 1 plot", "checks": 8, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Granliden 27. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d2-e0004", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "split": "eval", "seed": 10004, "path": "tasks/stand-inventory/stand-inventory-growth-d2-e0004", "title": "Increment for 6 stands", "checks": 13, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d2-e0005", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "split": "eval", "seed": 10005, "path": "tasks/stand-inventory/stand-inventory-plots-d2-e0005", "title": "Sample plot summary for 5 plots", "checks": 24, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Norrmyran 12. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d2-e0006", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "split": "eval", "seed": 10006, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-e0006", "title": "Thinning from below on a 400 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Granliden 27. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d2-e0007", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "split": "eval", "seed": 10007, "path": "tasks/stand-inventory/stand-inventory-volume-d2-e0007", "title": "Stand volume from 3 plots", "checks": 9, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Storskogen 31. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d3-e0008", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "split": "eval", "seed": 10008, "path": "tasks/stand-inventory/stand-inventory-growth-d3-e0008", "title": "Increment for 8 stands", "checks": 33, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d3-e0009", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "split": "eval", "seed": 10009, "path": "tasks/stand-inventory/stand-inventory-plots-d3-e0009", "title": "Sample plot summary for 7 plots", "checks": 36, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Langtjarn 5. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d3-e0010", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "split": "eval", "seed": 10010, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-e0010", "title": "Thinning from below on a 600 m2 plot", "checks": 10, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Bjorkbacken 8. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d3-e0011", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "split": "eval", "seed": 10011, "path": "tasks/stand-inventory/stand-inventory-volume-d3-e0011", "title": "Stand volume from 4 plots", "checks": 12, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Tallheden 4. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d1-e0012", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 1, "split": "eval", "seed": 10012, "path": "tasks/stand-inventory/stand-inventory-growth-d1-e0012", "title": "Increment for 4 stands", "checks": 9, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order. Nothing was cut in these stands. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d1-e0013", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 1, "split": "eval", "seed": 10013, "path": "tasks/stand-inventory/stand-inventory-plots-d1-e0013", "title": "Sample plot summary for 3 plots", "checks": 15, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 3 circular sample plots in stand Storskogen 31. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nEvery tallied tree is alive and stands inside its plot, so every row counts.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d1-e0014", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 1, "split": "eval", "seed": 10014, "path": "tasks/stand-inventory/stand-inventory-thinning-d1-e0014", "title": "Thinning from below on a 400 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Ravasen 22. `thinning_prescription.md` gives the plot area, the target and the rules. Every tree on the plot is alive.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d1-e0015", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 1, "split": "eval", "seed": 10015, "path": "tasks/stand-inventory/stand-inventory-volume-d1-e0015", "title": "Stand volume from 1 plot", "checks": 8, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on one sample plot in stand Langtjarn 5. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nEvery tree's height was measured.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d2-e0016", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 2, "split": "eval", "seed": 10016, "path": "tasks/stand-inventory/stand-inventory-growth-d2-e0016", "title": "Increment for 6 stands", "checks": 13, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds two inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d2-e0017", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 2, "split": "eval", "seed": 10017, "path": "tasks/stand-inventory/stand-inventory-plots-d2-e0017", "title": "Sample plot summary for 5 plots", "checks": 24, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 5 circular sample plots in stand Storskogen 31. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d2-e0018", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 2, "split": "eval", "seed": 10018, "path": "tasks/stand-inventory/stand-inventory-thinning-d2-e0018", "title": "Thinning from below on a 400 m2 plot", "checks": 7, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Kvarnmon 16. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d2-e0019", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 2, "split": "eval", "seed": 10019, "path": "tasks/stand-inventory/stand-inventory-volume-d2-e0019", "title": "Stand volume from 3 plots", "checks": 9, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 3 sample plots of equal size in stand Kvarnmon 16. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of trees whose height you took from the curve, as an integer.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-growth-d3-e0020", "env": "stand-inventory", "isced_f": "0821", "family": "growth", "difficulty": 3, "split": "eval", "seed": 10020, "path": "tasks/stand-inventory/stand-inventory-growth-d3-e0020", "title": "Increment for 8 stands", "checks": 33, "instruction": "# Stand inventory: growth and yield\n\n`inventories.csv` holds three inventories of each stand, in no particular order, and `removals.csv` lists the volumes cut. The removals file also covers stands that are not in this inventory; ignore those. Use only the two most recent inventories of each stand as V1 and V2; the oldest one matters only in that removals before it still count in the mean annual increment. `targets.csv` gives a target standing volume for each stand. `growth_notes.md` gives the formulas.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `stands`: an object keyed by stand id, each with\n - `periodic_annual_increment`: in m3 per hectare per year, 2 decimals.\n - `mean_annual_increment`: in m3 per hectare per year at the later inventory, 2 decimals.\n - `growth_percent`: Pressler's growth percent, in percent per year, 2 decimals.\n - `years_to_target`: whole years after the later inventory until the target volume is reached under the compound model in the notes, as an integer.\n- `past_culmination`: list of the stand ids whose periodic annual increment is below their mean annual increment (any order; an empty list if none).\n\nDo not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-plots-d3-e0021", "env": "stand-inventory", "isced_f": "0821", "family": "plots", "difficulty": 3, "split": "eval", "seed": 10021, "path": "tasks/stand-inventory/stand-inventory-plots-d3-e0021", "title": "Sample plot summary for 7 plots", "checks": 36, "instruction": "# Stand inventory: sample plots\n\n`tally.csv` is the tree tally from 7 circular sample plots in stand Storskogen 31. `inventory_notes.md` gives the plot radius and the formulas to use.\n\nCount a tree only if it is alive (`status` is `live`) and stands inside the plot: a tree is inside when its `dist_m` (horizontal distance from the plot centre) is not more than the plot radius. Dead trees and trees outside the plot are left out of everything. `plots.csv` gives each plot's radius and the unit its crew recorded `dbh` in (`cm` or `mm`); convert to cm first.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `plots`: an object keyed by plot id, each with\n - `trees_counted`: the number of trees that count, as an integer.\n - `stems_per_ha`: stems per hectare, 1 decimal.\n - `basal_area_m2_per_ha`: basal area in m2 per hectare, 2 decimals.\n - `qmd_cm`: quadratic mean diameter in cm, 1 decimal.\n- `stand`: an object with `stems_per_ha` (1 decimal) and `basal_area_m2_per_ha` (2 decimals), each the arithmetic mean of the plot values with every plot weighted equally, and `qmd_cm` (1 decimal), worked out from those two stand means with the quadratic mean diameter formula.\n- `understocked`: list of the plot ids whose basal area per hectare is below the understocked threshold in the notes (any order).\n- `species_basal_area`: an object keyed by species, for every species with at least one counted tree. Each value is that species' stand mean basal area in m2 per hectare, 2 decimals: the mean over all 7 plots of the species' basal area per hectare on each plot, counting 0 for plots where it does not occur.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-thinning-d3-e0022", "env": "stand-inventory", "isced_f": "0821", "family": "thinning", "difficulty": 3, "split": "eval", "seed": 10022, "path": "tasks/stand-inventory/stand-inventory-thinning-d3-e0022", "title": "Thinning from below on a 400 m2 plot", "checks": 11, "instruction": "# Stand inventory: marking a thinning\n\n`plot_trees.csv` lists the trees on one marking plot in stand Langtjarn 5. `thinning_prescription.md` gives the plot area, the target and the rules. The plot also holds dead trees and marked retention trees; the prescription says how to treat them.\n\nApply the rules exactly and write `answer.json` in this folder, a JSON object with:\n\n- `removed_trees`: list of the tree numbers to remove, as integers (any order).\n- `stems_removed`: how many trees are removed, as an integer.\n- `basal_area_before_m2_per_ha`: basal area of the live trees before thinning, in m2 per hectare, 2 decimals.\n- `residual_basal_area_m2_per_ha`: basal area of the live trees left standing, in m2 per hectare, 2 decimals.\n- `residual_stems_per_ha`: live stems left standing per hectare, 1 decimal.\n- `basal_area_removed_percent`: basal area removed as a percentage of the basal area before thinning, 1 decimal.\n- `thinning_ratio`: quadratic mean dbh of the removed trees divided by the quadratic mean dbh of all live trees before thinning, 2 decimals.\n- `removed_by_species`: an object keyed by species giving the number of trees removed, as integers. Include every species that has a live tree on the plot, with 0 if none is removed.\n- `residual_qmd_cm`: quadratic mean dbh of the live trees left standing, in cm, 1 decimal.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "stand-inventory-volume-d3-e0023", "env": "stand-inventory", "isced_f": "0821", "family": "volume", "difficulty": 3, "split": "eval", "seed": 10023, "path": "tasks/stand-inventory/stand-inventory-volume-d3-e0023", "title": "Stand volume from 4 plots", "checks": 12, "instruction": "# Stand inventory: volume\n\n`trees.csv` lists the trees callipered on 4 sample plots of equal size in stand Granliden 27. `volume_reference.md` gives the plot area, the volume equation and its coefficients.\n\nHeights were measured on sample trees only. Use the measured `height_m` where there is one; where it is blank, take the height from the height-diameter curve in the reference file, without rounding it. Leave out dead trees (`status` is `dead`) altogether. Aspen uses the form-factor rule in the reference file instead of the volume equation.\n\nWork out each tree's volume, then scale to the hectare: volume per hectare = sum of tree volumes on all plots x 10000 / (number of plots x plot area in m2).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `species`: an object keyed by species, each with\n - `volume_m3_per_ha`: that species' volume in m3 per hectare, 1 decimal.\n - `share_percent`: its share of the total volume in percent, 1 decimal.\n- `total_volume_m3_per_ha`: the volume of all species together in m3 per hectare, 1 decimal.\n- `dominant_species`: the species with the largest volume.\n- `trees_with_curve_height`: the number of live trees whose height you took from the curve, as an integer.\n- `lorey_height_m`: Lorey's mean height of the stand in m, 1 decimal: the mean height of all live trees on all plots, each tree weighted by its basal area pi x (d / 200)^2, using the same heights as for the volumes.\n\nUse pi at full precision and do not round intermediate values. Numbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-dosing-d1-t0000", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "split": "train", "seed": 0, "path": "tasks/ward-round/ward-round-dosing-d1-t0000", "title": "Doses and infusion rates for 4 orders", "checks": 8, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d1-t0001", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "split": "train", "seed": 1, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0001", "title": "Fluid balance for 3 patients", "checks": 10, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d1-t0002", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "split": "train", "seed": 2, "path": "tasks/ward-round/ward-round-news2-d1-t0002", "title": "Early-warning scores for 5 patients", "checks": 11, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order)."} +{"id": "ward-round-dosing-d2-t0003", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "split": "train", "seed": 3, "path": "tasks/ward-round/ward-round-dosing-d2-t0003", "title": "Doses and infusion rates for 7 orders", "checks": 21, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d2-t0004", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "split": "train", "seed": 4, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0004", "title": "Fluid balance for 5 patients", "checks": 21, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d2-t0005", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "split": "train", "seed": 5, "path": "tasks/ward-round/ward-round-news2-d2-t0005", "title": "Early-warning scores for 9 patients", "checks": 20, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d3-t0006", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "split": "train", "seed": 6, "path": "tasks/ward-round/ward-round-dosing-d3-t0006", "title": "Doses and infusion rates for 10 orders", "checks": 40, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d3-t0007", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "split": "train", "seed": 7, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0007", "title": "Fluid balance for 8 patients", "checks": 33, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d3-t0008", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "split": "train", "seed": 8, "path": "tasks/ward-round/ward-round-news2-d3-t0008", "title": "Early-warning scores for 14 patients", "checks": 30, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d1-t0009", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "split": "train", "seed": 9, "path": "tasks/ward-round/ward-round-dosing-d1-t0009", "title": "Doses and infusion rates for 4 orders", "checks": 8, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d1-t0010", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "split": "train", "seed": 10, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0010", "title": "Fluid balance for 3 patients", "checks": 10, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d1-t0011", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "split": "train", "seed": 11, "path": "tasks/ward-round/ward-round-news2-d1-t0011", "title": "Early-warning scores for 5 patients", "checks": 11, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order)."} +{"id": "ward-round-dosing-d2-t0012", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "split": "train", "seed": 12, "path": "tasks/ward-round/ward-round-dosing-d2-t0012", "title": "Doses and infusion rates for 7 orders", "checks": 21, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d2-t0013", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "split": "train", "seed": 13, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0013", "title": "Fluid balance for 5 patients", "checks": 21, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d2-t0014", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "split": "train", "seed": 14, "path": "tasks/ward-round/ward-round-news2-d2-t0014", "title": "Early-warning scores for 9 patients", "checks": 20, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d3-t0015", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "split": "train", "seed": 15, "path": "tasks/ward-round/ward-round-dosing-d3-t0015", "title": "Doses and infusion rates for 10 orders", "checks": 40, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d3-t0016", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "split": "train", "seed": 16, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0016", "title": "Fluid balance for 8 patients", "checks": 33, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d3-t0017", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "split": "train", "seed": 17, "path": "tasks/ward-round/ward-round-news2-d3-t0017", "title": "Early-warning scores for 14 patients", "checks": 30, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d1-t0018", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "split": "train", "seed": 18, "path": "tasks/ward-round/ward-round-dosing-d1-t0018", "title": "Doses and infusion rates for 4 orders", "checks": 8, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d1-t0019", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "split": "train", "seed": 19, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0019", "title": "Fluid balance for 3 patients", "checks": 10, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d1-t0020", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "split": "train", "seed": 20, "path": "tasks/ward-round/ward-round-news2-d1-t0020", "title": "Early-warning scores for 5 patients", "checks": 11, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order)."} +{"id": "ward-round-dosing-d2-t0021", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "split": "train", "seed": 21, "path": "tasks/ward-round/ward-round-dosing-d2-t0021", "title": "Doses and infusion rates for 7 orders", "checks": 21, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d2-t0022", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "split": "train", "seed": 22, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0022", "title": "Fluid balance for 5 patients", "checks": 21, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d2-t0023", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "split": "train", "seed": 23, "path": "tasks/ward-round/ward-round-news2-d2-t0023", "title": "Early-warning scores for 9 patients", "checks": 20, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d3-t0024", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "split": "train", "seed": 24, "path": "tasks/ward-round/ward-round-dosing-d3-t0024", "title": "Doses and infusion rates for 10 orders", "checks": 40, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d3-t0025", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "split": "train", "seed": 25, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0025", "title": "Fluid balance for 8 patients", "checks": 33, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d3-t0026", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "split": "train", "seed": 26, "path": "tasks/ward-round/ward-round-news2-d3-t0026", "title": "Early-warning scores for 14 patients", "checks": 30, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d1-t0027", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "split": "train", "seed": 27, "path": "tasks/ward-round/ward-round-dosing-d1-t0027", "title": "Doses and infusion rates for 4 orders", "checks": 8, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d1-t0028", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "split": "train", "seed": 28, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0028", "title": "Fluid balance for 3 patients", "checks": 10, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d1-t0029", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "split": "train", "seed": 29, "path": "tasks/ward-round/ward-round-news2-d1-t0029", "title": "Early-warning scores for 5 patients", "checks": 11, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order)."} +{"id": "ward-round-dosing-d2-t0030", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "split": "train", "seed": 30, "path": "tasks/ward-round/ward-round-dosing-d2-t0030", "title": "Doses and infusion rates for 7 orders", "checks": 21, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d2-t0031", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "split": "train", "seed": 31, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0031", "title": "Fluid balance for 5 patients", "checks": 21, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d2-t0032", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "split": "train", "seed": 32, "path": "tasks/ward-round/ward-round-news2-d2-t0032", "title": "Early-warning scores for 9 patients", "checks": 20, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d3-t0033", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "split": "train", "seed": 33, "path": "tasks/ward-round/ward-round-dosing-d3-t0033", "title": "Doses and infusion rates for 10 orders", "checks": 40, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d3-t0034", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "split": "train", "seed": 34, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0034", "title": "Fluid balance for 8 patients", "checks": 33, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d3-t0035", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "split": "train", "seed": 35, "path": "tasks/ward-round/ward-round-news2-d3-t0035", "title": "Early-warning scores for 14 patients", "checks": 30, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d1-t0036", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "split": "train", "seed": 36, "path": "tasks/ward-round/ward-round-dosing-d1-t0036", "title": "Doses and infusion rates for 4 orders", "checks": 8, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d1-t0037", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "split": "train", "seed": 37, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0037", "title": "Fluid balance for 3 patients", "checks": 10, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d1-t0038", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "split": "train", "seed": 38, "path": "tasks/ward-round/ward-round-news2-d1-t0038", "title": "Early-warning scores for 5 patients", "checks": 11, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order)."} +{"id": "ward-round-dosing-d2-t0039", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "split": "train", "seed": 39, "path": "tasks/ward-round/ward-round-dosing-d2-t0039", "title": "Doses and infusion rates for 7 orders", "checks": 21, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d2-t0040", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "split": "train", "seed": 40, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0040", "title": "Fluid balance for 5 patients", "checks": 21, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d2-t0041", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "split": "train", "seed": 41, "path": "tasks/ward-round/ward-round-news2-d2-t0041", "title": "Early-warning scores for 9 patients", "checks": 20, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d3-t0042", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "split": "train", "seed": 42, "path": "tasks/ward-round/ward-round-dosing-d3-t0042", "title": "Doses and infusion rates for 10 orders", "checks": 40, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d3-t0043", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "split": "train", "seed": 43, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0043", "title": "Fluid balance for 8 patients", "checks": 33, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d3-t0044", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "split": "train", "seed": 44, "path": "tasks/ward-round/ward-round-news2-d3-t0044", "title": "Early-warning scores for 14 patients", "checks": 30, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d1-t0045", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "split": "train", "seed": 45, "path": "tasks/ward-round/ward-round-dosing-d1-t0045", "title": "Doses and infusion rates for 4 orders", "checks": 8, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d1-t0046", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "split": "train", "seed": 46, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0046", "title": "Fluid balance for 3 patients", "checks": 10, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d1-t0047", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "split": "train", "seed": 47, "path": "tasks/ward-round/ward-round-news2-d1-t0047", "title": "Early-warning scores for 5 patients", "checks": 11, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order)."} +{"id": "ward-round-dosing-d2-t0048", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "split": "train", "seed": 48, "path": "tasks/ward-round/ward-round-dosing-d2-t0048", "title": "Doses and infusion rates for 7 orders", "checks": 21, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d2-t0049", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "split": "train", "seed": 49, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0049", "title": "Fluid balance for 5 patients", "checks": 21, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d2-t0050", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "split": "train", "seed": 50, "path": "tasks/ward-round/ward-round-news2-d2-t0050", "title": "Early-warning scores for 9 patients", "checks": 20, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d3-t0051", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "split": "train", "seed": 51, "path": "tasks/ward-round/ward-round-dosing-d3-t0051", "title": "Doses and infusion rates for 10 orders", "checks": 40, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d3-t0052", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "split": "train", "seed": 52, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0052", "title": "Fluid balance for 8 patients", "checks": 33, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d3-t0053", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "split": "train", "seed": 53, "path": "tasks/ward-round/ward-round-news2-d3-t0053", "title": "Early-warning scores for 14 patients", "checks": 30, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d1-t0054", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "split": "train", "seed": 54, "path": "tasks/ward-round/ward-round-dosing-d1-t0054", "title": "Doses and infusion rates for 4 orders", "checks": 8, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d1-t0055", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "split": "train", "seed": 55, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0055", "title": "Fluid balance for 3 patients", "checks": 10, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d1-t0056", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "split": "train", "seed": 56, "path": "tasks/ward-round/ward-round-news2-d1-t0056", "title": "Early-warning scores for 5 patients", "checks": 11, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order)."} +{"id": "ward-round-dosing-d2-t0057", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "split": "train", "seed": 57, "path": "tasks/ward-round/ward-round-dosing-d2-t0057", "title": "Doses and infusion rates for 7 orders", "checks": 21, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d2-t0058", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "split": "train", "seed": 58, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0058", "title": "Fluid balance for 5 patients", "checks": 21, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d2-t0059", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "split": "train", "seed": 59, "path": "tasks/ward-round/ward-round-news2-d2-t0059", "title": "Early-warning scores for 9 patients", "checks": 20, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d3-t0060", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "split": "train", "seed": 60, "path": "tasks/ward-round/ward-round-dosing-d3-t0060", "title": "Doses and infusion rates for 10 orders", "checks": 40, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d3-t0061", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "split": "train", "seed": 61, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0061", "title": "Fluid balance for 8 patients", "checks": 33, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d3-t0062", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "split": "train", "seed": 62, "path": "tasks/ward-round/ward-round-news2-d3-t0062", "title": "Early-warning scores for 14 patients", "checks": 30, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d1-t0063", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "split": "train", "seed": 63, "path": "tasks/ward-round/ward-round-dosing-d1-t0063", "title": "Doses and infusion rates for 4 orders", "checks": 8, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d1-t0064", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "split": "train", "seed": 64, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0064", "title": "Fluid balance for 3 patients", "checks": 10, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d1-t0065", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "split": "train", "seed": 65, "path": "tasks/ward-round/ward-round-news2-d1-t0065", "title": "Early-warning scores for 5 patients", "checks": 11, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order)."} +{"id": "ward-round-dosing-d2-t0066", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "split": "train", "seed": 66, "path": "tasks/ward-round/ward-round-dosing-d2-t0066", "title": "Doses and infusion rates for 7 orders", "checks": 21, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d2-t0067", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "split": "train", "seed": 67, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0067", "title": "Fluid balance for 5 patients", "checks": 21, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d2-t0068", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "split": "train", "seed": 68, "path": "tasks/ward-round/ward-round-news2-d2-t0068", "title": "Early-warning scores for 9 patients", "checks": 20, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d3-t0069", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "split": "train", "seed": 69, "path": "tasks/ward-round/ward-round-dosing-d3-t0069", "title": "Doses and infusion rates for 10 orders", "checks": 40, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d3-t0070", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "split": "train", "seed": 70, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0070", "title": "Fluid balance for 8 patients", "checks": 33, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d3-t0071", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "split": "train", "seed": 71, "path": "tasks/ward-round/ward-round-news2-d3-t0071", "title": "Early-warning scores for 14 patients", "checks": 30, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d1-t0072", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "split": "train", "seed": 72, "path": "tasks/ward-round/ward-round-dosing-d1-t0072", "title": "Doses and infusion rates for 4 orders", "checks": 8, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d1-t0073", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "split": "train", "seed": 73, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0073", "title": "Fluid balance for 3 patients", "checks": 10, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d1-t0074", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "split": "train", "seed": 74, "path": "tasks/ward-round/ward-round-news2-d1-t0074", "title": "Early-warning scores for 5 patients", "checks": 11, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order)."} +{"id": "ward-round-dosing-d2-t0075", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "split": "train", "seed": 75, "path": "tasks/ward-round/ward-round-dosing-d2-t0075", "title": "Doses and infusion rates for 7 orders", "checks": 21, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d2-t0076", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "split": "train", "seed": 76, "path": "tasks/ward-round/ward-round-fluid-balance-d2-t0076", "title": "Fluid balance for 5 patients", "checks": 21, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d2-t0077", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "split": "train", "seed": 77, "path": "tasks/ward-round/ward-round-news2-d2-t0077", "title": "Early-warning scores for 9 patients", "checks": 20, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d3-t0078", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "split": "train", "seed": 78, "path": "tasks/ward-round/ward-round-dosing-d3-t0078", "title": "Doses and infusion rates for 10 orders", "checks": 40, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d3-t0079", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "split": "train", "seed": 79, "path": "tasks/ward-round/ward-round-fluid-balance-d3-t0079", "title": "Fluid balance for 8 patients", "checks": 33, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d3-t0080", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "split": "train", "seed": 80, "path": "tasks/ward-round/ward-round-news2-d3-t0080", "title": "Early-warning scores for 14 patients", "checks": 30, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d1-t0081", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "split": "train", "seed": 81, "path": "tasks/ward-round/ward-round-dosing-d1-t0081", "title": "Doses and infusion rates for 4 orders", "checks": 8, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d1-t0082", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "split": "train", "seed": 82, "path": "tasks/ward-round/ward-round-fluid-balance-d1-t0082", "title": "Fluid balance for 3 patients", "checks": 10, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d1-t0083", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "split": "train", "seed": 83, "path": "tasks/ward-round/ward-round-news2-d1-t0083", "title": "Early-warning scores for 5 patients", "checks": 11, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order)."} +{"id": "ward-round-dosing-d1-e0000", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "split": "eval", "seed": 10000, "path": "tasks/ward-round/ward-round-dosing-d1-e0000", "title": "Doses and infusion rates for 4 orders", "checks": 8, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d1-e0001", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "split": "eval", "seed": 10001, "path": "tasks/ward-round/ward-round-fluid-balance-d1-e0001", "title": "Fluid balance for 3 patients", "checks": 10, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d1-e0002", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "split": "eval", "seed": 10002, "path": "tasks/ward-round/ward-round-news2-d1-e0002", "title": "Early-warning scores for 5 patients", "checks": 11, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order)."} +{"id": "ward-round-dosing-d2-e0003", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "split": "eval", "seed": 10003, "path": "tasks/ward-round/ward-round-dosing-d2-e0003", "title": "Doses and infusion rates for 7 orders", "checks": 21, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d2-e0004", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "split": "eval", "seed": 10004, "path": "tasks/ward-round/ward-round-fluid-balance-d2-e0004", "title": "Fluid balance for 5 patients", "checks": 21, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d2-e0005", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "split": "eval", "seed": 10005, "path": "tasks/ward-round/ward-round-news2-d2-e0005", "title": "Early-warning scores for 9 patients", "checks": 20, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d3-e0006", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "split": "eval", "seed": 10006, "path": "tasks/ward-round/ward-round-dosing-d3-e0006", "title": "Doses and infusion rates for 10 orders", "checks": 40, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d3-e0007", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "split": "eval", "seed": 10007, "path": "tasks/ward-round/ward-round-fluid-balance-d3-e0007", "title": "Fluid balance for 8 patients", "checks": 33, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d3-e0008", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "split": "eval", "seed": 10008, "path": "tasks/ward-round/ward-round-news2-d3-e0008", "title": "Early-warning scores for 14 patients", "checks": 30, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d1-e0009", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "split": "eval", "seed": 10009, "path": "tasks/ward-round/ward-round-dosing-d1-e0009", "title": "Doses and infusion rates for 4 orders", "checks": 8, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d1-e0010", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "split": "eval", "seed": 10010, "path": "tasks/ward-round/ward-round-fluid-balance-d1-e0010", "title": "Fluid balance for 3 patients", "checks": 10, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d1-e0011", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "split": "eval", "seed": 10011, "path": "tasks/ward-round/ward-round-news2-d1-e0011", "title": "Early-warning scores for 5 patients", "checks": 11, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order)."} +{"id": "ward-round-dosing-d2-e0012", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "split": "eval", "seed": 10012, "path": "tasks/ward-round/ward-round-dosing-d2-e0012", "title": "Doses and infusion rates for 7 orders", "checks": 21, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d2-e0013", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "split": "eval", "seed": 10013, "path": "tasks/ward-round/ward-round-fluid-balance-d2-e0013", "title": "Fluid balance for 5 patients", "checks": 21, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d2-e0014", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "split": "eval", "seed": 10014, "path": "tasks/ward-round/ward-round-news2-d2-e0014", "title": "Early-warning scores for 9 patients", "checks": 20, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d3-e0015", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 3, "split": "eval", "seed": 10015, "path": "tasks/ward-round/ward-round-dosing-d3-e0015", "title": "Doses and infusion rates for 10 orders", "checks": 40, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n- `drops_per_min`: for a gravity set with the given `drop_factor_gtt_per_ml`, the drip rate that delivers the bag in the same time, as a whole number of drops per minute (round half up).\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d3-e0016", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 3, "split": "eval", "seed": 10016, "path": "tasks/ward-round/ward-round-fluid-balance-d3-e0016", "title": "Fluid balance for 8 patients", "checks": 33, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d3-e0017", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 3, "split": "eval", "seed": 10017, "path": "tasks/ward-round/ward-round-news2-d3-e0017", "title": "Early-warning scores for 14 patients", "checks": 30, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (3 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "ward-round-dosing-d1-e0018", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 1, "split": "eval", "seed": 10018, "path": "tasks/ward-round/ward-round-dosing-d1-e0018", "title": "Doses and infusion rates for 4 orders", "checks": 8, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Give the drug as a single dose drawn up from the stock solution.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d1-e0019", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 1, "split": "eval", "seed": 10019, "path": "tasks/ward-round/ward-round-fluid-balance-d1-e0019", "title": "Fluid balance for 3 patients", "checks": 10, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59).\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d1-e0020", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 1, "split": "eval", "seed": 10020, "path": "tasks/ward-round/ward-round-news2-d1-e0020", "title": "Early-warning scores for 5 patients", "checks": 11, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today. `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order)."} +{"id": "ward-round-dosing-d2-e0021", "env": "ward-round", "isced_f": "0913", "family": "dosing", "difficulty": 2, "split": "eval", "seed": 10021, "path": "tasks/ward-round/ward-round-dosing-d2-e0021", "title": "Doses and infusion rates for 7 orders", "checks": 21, "instruction": "# Ward round: doses and infusions\n\n`orders.csv` lists today's weight-based medication orders. Each dose is then given in an infusion bag. The bag volume is the total volume to infuse; do not add the drug volume to it.\n\nWrite `answer.json` in this folder: a JSON object with one key, `orders`, an object keyed by order id. For each order give:\n\n- `dose_mg`: the single dose in mg, 2 decimals. It is `dose_mg_per_kg` times `weight_kg`, but never more than `max_single_dose_mg`.\n- `volume_ml`: the volume of stock solution that holds that dose, in ml, 2 decimals.\n- `pump_rate_ml_per_h`: the pump rate that delivers the whole bag (`bag_volume_ml`) in `infuse_over_min` minutes, in ml per hour, 1 decimal.\n\nNumbers are accepted within one unit of the last decimal place asked for."} +{"id": "ward-round-fluid-balance-d2-e0022", "env": "ward-round", "isced_f": "0913", "family": "fluid-balance", "difficulty": 2, "split": "eval", "seed": 10022, "path": "tasks/ward-round/ward-round-fluid-balance-d2-e0022", "title": "Fluid balance for 5 patients", "checks": 21, "instruction": "# Ward round: 24-hour fluid balance\n\n`fluid_chart.csv` is the ward's intake and output chart and `patients.csv` gives each patient's weight. Work out the fluid balance for **today** (00:00 to 23:59). The chart also carries some entries from yesterday; leave those out.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id, each with\n - `intake_ml`: total of all `in` entries, as an integer.\n - `output_ml`: total of all `out` entries (urine, drains, vomit and stool), as an integer.\n - `balance_ml`: intake minus output (negative if output is larger).\n - `urine_ml_per_kg_per_h`: urine output today divided by weight and by 24 hours, 2 decimals.\n- `oliguria`: list of the patient ids whose urine output today is below 0.5 ml per kg per hour, averaged over the 24 hours (any order; an empty list if none)."} +{"id": "ward-round-news2-d2-e0023", "env": "ward-round", "isced_f": "0913", "family": "news2", "difficulty": 2, "split": "eval", "seed": 10023, "path": "tasks/ward-round/ward-round-news2-d2-e0023", "title": "Early-warning scores for 9 patients", "checks": 20, "instruction": "# Ward round: early-warning scores\n\n`observations.csv` holds the observation sets charted on the ward today (2 sets per patient, in no particular order). `news2_rules.md` gives the scoring rules.\n\nFor every patient, score their **latest** observation set and work out the response band.\n\nWrite `answer.json` in this folder, a JSON object with:\n\n- `patients`: an object keyed by patient id. Each value is `{\"score\": , \"band\": \"\"}`.\n- `medium_or_high`: list of the patient ids whose band is `medium` or `high` (any order).\n- `rising`: list of patient ids whose total at their latest observation set is at least 2 points higher than at the set before it."} +{"id": "zoning-check-capacity-d1-t0000", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "split": "train", "seed": 0, "path": "tasks/zoning-check/zoning-check-capacity-d1-t0000", "title": "Planning review: capacity", "checks": 15, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d1-t0001", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "split": "train", "seed": 1, "path": "tasks/zoning-check/zoning-check-compliance-d1-t0001", "title": "Planning review: compliance", "checks": 12, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d1-t0002", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "split": "train", "seed": 2, "path": "tasks/zoning-check/zoning-check-geometry-d1-t0002", "title": "Planning review: geometry", "checks": 9, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d1-t0003", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "split": "train", "seed": 3, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-t0003", "title": "Planning review: mixed-use", "checks": 12, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d2-t0004", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "split": "train", "seed": 4, "path": "tasks/zoning-check/zoning-check-capacity-d2-t0004", "title": "Planning review: capacity", "checks": 20, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d2-t0005", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "split": "train", "seed": 5, "path": "tasks/zoning-check/zoning-check-compliance-d2-t0005", "title": "Planning review: compliance", "checks": 16, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d2-t0006", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "split": "train", "seed": 6, "path": "tasks/zoning-check/zoning-check-geometry-d2-t0006", "title": "Planning review: geometry", "checks": 12, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d2-t0007", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "split": "train", "seed": 7, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-t0007", "title": "Planning review: mixed-use", "checks": 16, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d3-t0008", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "split": "train", "seed": 8, "path": "tasks/zoning-check/zoning-check-capacity-d3-t0008", "title": "Planning review: capacity", "checks": 25, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d3-t0009", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "split": "train", "seed": 9, "path": "tasks/zoning-check/zoning-check-compliance-d3-t0009", "title": "Planning review: compliance", "checks": 20, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d3-t0010", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "split": "train", "seed": 10, "path": "tasks/zoning-check/zoning-check-geometry-d3-t0010", "title": "Planning review: geometry", "checks": 15, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d3-t0011", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "split": "train", "seed": 11, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-t0011", "title": "Planning review: mixed-use", "checks": 20, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d1-t0012", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "split": "train", "seed": 12, "path": "tasks/zoning-check/zoning-check-capacity-d1-t0012", "title": "Planning review: capacity", "checks": 15, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d1-t0013", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "split": "train", "seed": 13, "path": "tasks/zoning-check/zoning-check-compliance-d1-t0013", "title": "Planning review: compliance", "checks": 12, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d1-t0014", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "split": "train", "seed": 14, "path": "tasks/zoning-check/zoning-check-geometry-d1-t0014", "title": "Planning review: geometry", "checks": 9, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d1-t0015", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "split": "train", "seed": 15, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-t0015", "title": "Planning review: mixed-use", "checks": 12, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d2-t0016", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "split": "train", "seed": 16, "path": "tasks/zoning-check/zoning-check-capacity-d2-t0016", "title": "Planning review: capacity", "checks": 20, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d2-t0017", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "split": "train", "seed": 17, "path": "tasks/zoning-check/zoning-check-compliance-d2-t0017", "title": "Planning review: compliance", "checks": 16, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d2-t0018", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "split": "train", "seed": 18, "path": "tasks/zoning-check/zoning-check-geometry-d2-t0018", "title": "Planning review: geometry", "checks": 12, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d2-t0019", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "split": "train", "seed": 19, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-t0019", "title": "Planning review: mixed-use", "checks": 16, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d3-t0020", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "split": "train", "seed": 20, "path": "tasks/zoning-check/zoning-check-capacity-d3-t0020", "title": "Planning review: capacity", "checks": 25, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d3-t0021", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "split": "train", "seed": 21, "path": "tasks/zoning-check/zoning-check-compliance-d3-t0021", "title": "Planning review: compliance", "checks": 20, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d3-t0022", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "split": "train", "seed": 22, "path": "tasks/zoning-check/zoning-check-geometry-d3-t0022", "title": "Planning review: geometry", "checks": 15, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d3-t0023", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "split": "train", "seed": 23, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-t0023", "title": "Planning review: mixed-use", "checks": 20, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d1-t0024", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "split": "train", "seed": 24, "path": "tasks/zoning-check/zoning-check-capacity-d1-t0024", "title": "Planning review: capacity", "checks": 15, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d1-t0025", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "split": "train", "seed": 25, "path": "tasks/zoning-check/zoning-check-compliance-d1-t0025", "title": "Planning review: compliance", "checks": 12, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d1-t0026", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "split": "train", "seed": 26, "path": "tasks/zoning-check/zoning-check-geometry-d1-t0026", "title": "Planning review: geometry", "checks": 9, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d1-t0027", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "split": "train", "seed": 27, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-t0027", "title": "Planning review: mixed-use", "checks": 12, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d2-t0028", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "split": "train", "seed": 28, "path": "tasks/zoning-check/zoning-check-capacity-d2-t0028", "title": "Planning review: capacity", "checks": 20, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d2-t0029", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "split": "train", "seed": 29, "path": "tasks/zoning-check/zoning-check-compliance-d2-t0029", "title": "Planning review: compliance", "checks": 16, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d2-t0030", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "split": "train", "seed": 30, "path": "tasks/zoning-check/zoning-check-geometry-d2-t0030", "title": "Planning review: geometry", "checks": 12, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d2-t0031", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "split": "train", "seed": 31, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-t0031", "title": "Planning review: mixed-use", "checks": 16, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d3-t0032", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "split": "train", "seed": 32, "path": "tasks/zoning-check/zoning-check-capacity-d3-t0032", "title": "Planning review: capacity", "checks": 25, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d3-t0033", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "split": "train", "seed": 33, "path": "tasks/zoning-check/zoning-check-compliance-d3-t0033", "title": "Planning review: compliance", "checks": 20, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d3-t0034", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "split": "train", "seed": 34, "path": "tasks/zoning-check/zoning-check-geometry-d3-t0034", "title": "Planning review: geometry", "checks": 15, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d3-t0035", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "split": "train", "seed": 35, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-t0035", "title": "Planning review: mixed-use", "checks": 20, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d1-t0036", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "split": "train", "seed": 36, "path": "tasks/zoning-check/zoning-check-capacity-d1-t0036", "title": "Planning review: capacity", "checks": 15, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d1-t0037", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "split": "train", "seed": 37, "path": "tasks/zoning-check/zoning-check-compliance-d1-t0037", "title": "Planning review: compliance", "checks": 12, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d1-t0038", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "split": "train", "seed": 38, "path": "tasks/zoning-check/zoning-check-geometry-d1-t0038", "title": "Planning review: geometry", "checks": 9, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d1-t0039", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "split": "train", "seed": 39, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-t0039", "title": "Planning review: mixed-use", "checks": 12, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d2-t0040", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "split": "train", "seed": 40, "path": "tasks/zoning-check/zoning-check-capacity-d2-t0040", "title": "Planning review: capacity", "checks": 20, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d2-t0041", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "split": "train", "seed": 41, "path": "tasks/zoning-check/zoning-check-compliance-d2-t0041", "title": "Planning review: compliance", "checks": 16, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d2-t0042", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "split": "train", "seed": 42, "path": "tasks/zoning-check/zoning-check-geometry-d2-t0042", "title": "Planning review: geometry", "checks": 12, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d2-t0043", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "split": "train", "seed": 43, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-t0043", "title": "Planning review: mixed-use", "checks": 16, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d3-t0044", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "split": "train", "seed": 44, "path": "tasks/zoning-check/zoning-check-capacity-d3-t0044", "title": "Planning review: capacity", "checks": 25, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d3-t0045", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "split": "train", "seed": 45, "path": "tasks/zoning-check/zoning-check-compliance-d3-t0045", "title": "Planning review: compliance", "checks": 20, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d3-t0046", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "split": "train", "seed": 46, "path": "tasks/zoning-check/zoning-check-geometry-d3-t0046", "title": "Planning review: geometry", "checks": 15, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d3-t0047", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "split": "train", "seed": 47, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-t0047", "title": "Planning review: mixed-use", "checks": 20, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d1-t0048", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "split": "train", "seed": 48, "path": "tasks/zoning-check/zoning-check-capacity-d1-t0048", "title": "Planning review: capacity", "checks": 15, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d1-t0049", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "split": "train", "seed": 49, "path": "tasks/zoning-check/zoning-check-compliance-d1-t0049", "title": "Planning review: compliance", "checks": 12, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d1-t0050", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "split": "train", "seed": 50, "path": "tasks/zoning-check/zoning-check-geometry-d1-t0050", "title": "Planning review: geometry", "checks": 9, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d1-t0051", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "split": "train", "seed": 51, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-t0051", "title": "Planning review: mixed-use", "checks": 12, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d2-t0052", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "split": "train", "seed": 52, "path": "tasks/zoning-check/zoning-check-capacity-d2-t0052", "title": "Planning review: capacity", "checks": 20, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d2-t0053", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "split": "train", "seed": 53, "path": "tasks/zoning-check/zoning-check-compliance-d2-t0053", "title": "Planning review: compliance", "checks": 16, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d2-t0054", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "split": "train", "seed": 54, "path": "tasks/zoning-check/zoning-check-geometry-d2-t0054", "title": "Planning review: geometry", "checks": 12, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d2-t0055", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "split": "train", "seed": 55, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-t0055", "title": "Planning review: mixed-use", "checks": 16, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d3-t0056", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "split": "train", "seed": 56, "path": "tasks/zoning-check/zoning-check-capacity-d3-t0056", "title": "Planning review: capacity", "checks": 25, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d3-t0057", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "split": "train", "seed": 57, "path": "tasks/zoning-check/zoning-check-compliance-d3-t0057", "title": "Planning review: compliance", "checks": 20, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d3-t0058", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "split": "train", "seed": 58, "path": "tasks/zoning-check/zoning-check-geometry-d3-t0058", "title": "Planning review: geometry", "checks": 15, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d3-t0059", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "split": "train", "seed": 59, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-t0059", "title": "Planning review: mixed-use", "checks": 20, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d1-t0060", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "split": "train", "seed": 60, "path": "tasks/zoning-check/zoning-check-capacity-d1-t0060", "title": "Planning review: capacity", "checks": 15, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d1-t0061", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "split": "train", "seed": 61, "path": "tasks/zoning-check/zoning-check-compliance-d1-t0061", "title": "Planning review: compliance", "checks": 12, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d1-t0062", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "split": "train", "seed": 62, "path": "tasks/zoning-check/zoning-check-geometry-d1-t0062", "title": "Planning review: geometry", "checks": 9, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d1-t0063", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "split": "train", "seed": 63, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-t0063", "title": "Planning review: mixed-use", "checks": 12, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d2-t0064", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "split": "train", "seed": 64, "path": "tasks/zoning-check/zoning-check-capacity-d2-t0064", "title": "Planning review: capacity", "checks": 20, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d2-t0065", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "split": "train", "seed": 65, "path": "tasks/zoning-check/zoning-check-compliance-d2-t0065", "title": "Planning review: compliance", "checks": 16, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d2-t0066", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "split": "train", "seed": 66, "path": "tasks/zoning-check/zoning-check-geometry-d2-t0066", "title": "Planning review: geometry", "checks": 12, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d2-t0067", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "split": "train", "seed": 67, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-t0067", "title": "Planning review: mixed-use", "checks": 16, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d3-t0068", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "split": "train", "seed": 68, "path": "tasks/zoning-check/zoning-check-capacity-d3-t0068", "title": "Planning review: capacity", "checks": 25, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d3-t0069", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "split": "train", "seed": 69, "path": "tasks/zoning-check/zoning-check-compliance-d3-t0069", "title": "Planning review: compliance", "checks": 20, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d3-t0070", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "split": "train", "seed": 70, "path": "tasks/zoning-check/zoning-check-geometry-d3-t0070", "title": "Planning review: geometry", "checks": 15, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d3-t0071", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "split": "train", "seed": 71, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-t0071", "title": "Planning review: mixed-use", "checks": 20, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d1-t0072", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "split": "train", "seed": 72, "path": "tasks/zoning-check/zoning-check-capacity-d1-t0072", "title": "Planning review: capacity", "checks": 15, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d1-t0073", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "split": "train", "seed": 73, "path": "tasks/zoning-check/zoning-check-compliance-d1-t0073", "title": "Planning review: compliance", "checks": 12, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d1-t0074", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "split": "train", "seed": 74, "path": "tasks/zoning-check/zoning-check-geometry-d1-t0074", "title": "Planning review: geometry", "checks": 9, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d1-t0075", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "split": "train", "seed": 75, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-t0075", "title": "Planning review: mixed-use", "checks": 12, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d2-t0076", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "split": "train", "seed": 76, "path": "tasks/zoning-check/zoning-check-capacity-d2-t0076", "title": "Planning review: capacity", "checks": 20, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d2-t0077", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "split": "train", "seed": 77, "path": "tasks/zoning-check/zoning-check-compliance-d2-t0077", "title": "Planning review: compliance", "checks": 16, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d2-t0078", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "split": "train", "seed": 78, "path": "tasks/zoning-check/zoning-check-geometry-d2-t0078", "title": "Planning review: geometry", "checks": 12, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d2-t0079", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "split": "train", "seed": 79, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-t0079", "title": "Planning review: mixed-use", "checks": 16, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d3-t0080", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "split": "train", "seed": 80, "path": "tasks/zoning-check/zoning-check-capacity-d3-t0080", "title": "Planning review: capacity", "checks": 25, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d3-t0081", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "split": "train", "seed": 81, "path": "tasks/zoning-check/zoning-check-compliance-d3-t0081", "title": "Planning review: compliance", "checks": 20, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d3-t0082", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "split": "train", "seed": 82, "path": "tasks/zoning-check/zoning-check-geometry-d3-t0082", "title": "Planning review: geometry", "checks": 15, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d3-t0083", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "split": "train", "seed": 83, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-t0083", "title": "Planning review: mixed-use", "checks": 20, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d1-e0000", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "split": "eval", "seed": 10000, "path": "tasks/zoning-check/zoning-check-capacity-d1-e0000", "title": "Planning review: capacity", "checks": 15, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d1-e0001", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "split": "eval", "seed": 10001, "path": "tasks/zoning-check/zoning-check-compliance-d1-e0001", "title": "Planning review: compliance", "checks": 12, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d1-e0002", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "split": "eval", "seed": 10002, "path": "tasks/zoning-check/zoning-check-geometry-d1-e0002", "title": "Planning review: geometry", "checks": 9, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d1-e0003", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "split": "eval", "seed": 10003, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-e0003", "title": "Planning review: mixed-use", "checks": 12, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d2-e0004", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "split": "eval", "seed": 10004, "path": "tasks/zoning-check/zoning-check-capacity-d2-e0004", "title": "Planning review: capacity", "checks": 20, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d2-e0005", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "split": "eval", "seed": 10005, "path": "tasks/zoning-check/zoning-check-compliance-d2-e0005", "title": "Planning review: compliance", "checks": 16, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d2-e0006", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "split": "eval", "seed": 10006, "path": "tasks/zoning-check/zoning-check-geometry-d2-e0006", "title": "Planning review: geometry", "checks": 12, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d2-e0007", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "split": "eval", "seed": 10007, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-e0007", "title": "Planning review: mixed-use", "checks": 16, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d3-e0008", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "split": "eval", "seed": 10008, "path": "tasks/zoning-check/zoning-check-capacity-d3-e0008", "title": "Planning review: capacity", "checks": 25, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d3-e0009", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "split": "eval", "seed": 10009, "path": "tasks/zoning-check/zoning-check-compliance-d3-e0009", "title": "Planning review: compliance", "checks": 20, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d3-e0010", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "split": "eval", "seed": 10010, "path": "tasks/zoning-check/zoning-check-geometry-d3-e0010", "title": "Planning review: geometry", "checks": 15, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d3-e0011", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "split": "eval", "seed": 10011, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-e0011", "title": "Planning review: mixed-use", "checks": 20, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d1-e0012", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 1, "split": "eval", "seed": 10012, "path": "tasks/zoning-check/zoning-check-capacity-d1-e0012", "title": "Planning review: capacity", "checks": 15, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d1-e0013", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 1, "split": "eval", "seed": 10013, "path": "tasks/zoning-check/zoning-check-compliance-d1-e0013", "title": "Planning review: compliance", "checks": 12, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d1-e0014", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 1, "split": "eval", "seed": 10014, "path": "tasks/zoning-check/zoning-check-geometry-d1-e0014", "title": "Planning review: geometry", "checks": 9, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d1-e0015", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 1, "split": "eval", "seed": 10015, "path": "tasks/zoning-check/zoning-check-mixed-use-d1-e0015", "title": "Planning review: mixed-use", "checks": 12, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d2-e0016", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 2, "split": "eval", "seed": 10016, "path": "tasks/zoning-check/zoning-check-capacity-d2-e0016", "title": "Planning review: capacity", "checks": 20, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d2-e0017", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 2, "split": "eval", "seed": 10017, "path": "tasks/zoning-check/zoning-check-compliance-d2-e0017", "title": "Planning review: compliance", "checks": 16, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d2-e0018", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 2, "split": "eval", "seed": 10018, "path": "tasks/zoning-check/zoning-check-geometry-d2-e0018", "title": "Planning review: geometry", "checks": 12, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d2-e0019", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 2, "split": "eval", "seed": 10019, "path": "tasks/zoning-check/zoning-check-mixed-use-d2-e0019", "title": "Planning review: mixed-use", "checks": 16, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} +{"id": "zoning-check-capacity-d3-e0020", "env": "zoning-check", "isced_f": "0731", "family": "capacity", "difficulty": 3, "split": "eval", "seed": 10020, "path": "tasks/zoning-check/zoning-check-capacity-d3-e0020", "title": "Planning review: capacity", "checks": 25, "instruction": "# Zoning Check: capacity\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. Find the largest gross floor area for each rectangular plot with the stated number of storeys. Ignore parking and height in this exercise. Floor area cannot exceed any of: site area times max_far; site area times max_coverage times storeys; or max(0,width-2*setback) times max(0,depth-2*setback) times storeys. The smallest is binding; no ties occur.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id. Each value has `max_floor_m2`, `binding` (`far`, `coverage` or `setbacks`), and the three limits `far_limit_m2`, `coverage_limit_m2`, `setbacks_limit_m2`, all areas in square metres."} +{"id": "zoning-check-compliance-d3-e0021", "env": "zoning-check", "isced_f": "0731", "family": "compliance", "difficulty": 3, "split": "eval", "seed": 10021, "path": "tasks/zoning-check/zoning-check-compliance-d3-e0021", "title": "Planning review: compliance", "checks": 20, "instruction": "# Zoning Check: compliance\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `proposals.csv` lists rectangular plots and proposed buildings. Gross floor area includes every storey. Limits are inclusive: equality passes. Flag a setback violation if any of the four setbacks is too small.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `site_m2` (width times depth), `far` (gross floor area divided by site area), `coverage_percent` (100 times footprint divided by site area), and `violations` (distinct strings from `far`, `coverage`, `setback`, `height`, or an empty list)."} +{"id": "zoning-check-geometry-d3-e0022", "env": "zoning-check", "isced_f": "0731", "family": "geometry", "difficulty": 3, "split": "eval", "seed": 10022, "path": "tasks/zoning-check/zoning-check-geometry-d3-e0022", "title": "Planning review: geometry", "checks": 15, "instruction": "# Zoning Check: geometry\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `boundaries.json` gives each simple plot polygon as ordered [x,y] pairs in metres. The last point joins back to the first; orientation can vary. Compute area with the shoelace formula: half the absolute value of sum(x_i*y_next-x_next*y_i). `buildings.csv` supplies proposed floor and footprint areas.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `plots` is keyed by plot id, with `site_m2`, `far` (floor/site area) and `coverage_percent` (100*footprint/site area)."} +{"id": "zoning-check-mixed-use-d3-e0023", "env": "zoning-check", "isced_f": "0731", "family": "mixed-use", "difficulty": 3, "split": "eval", "seed": 10023, "path": "tasks/zoning-check/zoning-check-mixed-use-d3-e0023", "title": "Planning review: mixed-use", "checks": 20, "instruction": "# Zoning Check: mixed-use\n\nAll records are synthetic. Apply only the fictional limits in `zoning_code.json`. `uses.csv` lists mixed-use proposals. Required spaces = ceil(dwellings*parking_per_dwelling + shop_m2/shop_m2_per_space + office_m2/office_m2_per_space). Round upward once, after summing uses. Each space requires parking_area_m2 of land. Notes are irrelevant.\n\nWrite `answer.json` as one JSON object. Round numbers to 2 decimal places without rounding intermediate calculations; numbers are accepted within 0.01. `proposals` is keyed by proposal id. Each value has `unrounded_spaces` (the sum before ceiling), `required_spaces` (integer), `shortfall` (max(0, required minus provided), integer), and `required_parking_m2`."} diff --git a/tests/test_argument_check.py b/tests/test_argument_check.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c198621aa3c02568f737a21929e9943837e67a --- /dev/null +++ b/tests/test_argument_check.py @@ -0,0 +1,264 @@ +#!/usr/bin/env python3 +"""Tests for the Argument Check environment: python3 tests/test_argument_check.py + +Hand-worked truth tables for each family (checked against gen.py's formula functions), agreement of the +three separately written parsers, and accept/reject cases for every custom validator. +""" +import importlib.util, itertools, os, random, sys +ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +sys.path.insert(0, ROOT) +from envs.argument_check import gen + +def load(name): + spec = importlib.util.spec_from_file_location("argument_check_" + name, os.path.join(ROOT, "envs", "argument_check", name + ".py")) + m = importlib.util.module_from_spec(spec); spec.loader.exec_module(m); return m +oracle, val = load("oracle"), load("validators") +P = gen.parse + +# ------------------------------------------------------------ syntax: precedence and grouping +def test_syntax(): + assert P("A & B | C") == ("|", ("&", "A", "B"), "C") + assert P("A | B & C") == ("|", "A", ("&", "B", "C")) + assert P("~A & B") == ("&", ("~", "A"), "B") + assert P("A | B -> C & D") == ("->", ("|", "A", "B"), ("&", "C", "D")) + assert P("A -> B <-> C") == ("<->", ("->", "A", "B"), "C") + assert P("A & B & C") == ("&", ("&", "A", "B"), "C") + assert P("A | B | C") == ("|", ("|", "A", "B"), "C") + assert P("A -> B -> C") == ("->", "A", ("->", "B", "C")) + assert P("A <-> B <-> C") == ("<->", "A", ("<->", "B", "C")) + assert P("~~A") == ("~", ("~", "A")) and P("~(A|B)") == ("~", ("|", "A", "B")) + assert P("A<->B->~C|D&E") == ("<->", "A", ("->", "B", ("|", ("~", "C"), ("&", "D", "E")))) + # printing keeps the tree, in both styles + for s in ["A -> B -> C", "(A -> B) -> C", "A & (B & C)", "~(A & B) | C <-> (D <-> E)", "A & B | C & ~D", "(A | B) & (C | D)"]: + f = P(s) + assert P(gen.show(f, "lean")) == f and P(gen.show(f, "full")) == f + assert gen.show(P("(A -> B) -> C")) == "(A -> B) -> C" and gen.show(P("A -> (B -> C)")) == "A -> B -> C" + assert gen.show(P("A & B | C"), "full") == "(A & B) | C" + +def truth(f, order, bits): + return gen.ev(f, dict(zip(order, bits))) + +def test_three_parsers_agree(): + r = random.Random(7) + for i in range(3000): + atoms = sorted(r.sample("ABCDEFGH", r.randint(2, 5))) + f = gen.rand_formula(r, atoms, r.randint(0, 4)) + s = gen.show(f, r.choice(["lean", "full"]), r if i % 2 else None) + if i % 5 == 0: s = s.replace(" ", "") + assert gen.parse(s) == f + rpn, tree = oracle.to_rpn(s), val._read(s) + assert oracle.letters([rpn]) == gen.atoms_of([f]) == sorted(val._atoms([tree])) + for v in gen.table(gen.atoms_of([f])): + assert gen.ev(f, v) == oracle.run(rpn, v) == val._value(tree, v), s + for bad in ["", "A &", "A B", "(A", "A)", "A -> -> B", "a", "A <- B", "~", "A ~ B", "()", "A & (B", "A = B", "A <-> ", "& A", "A (B)", "1", "AB"]: + for fn in (gen.parse, oracle.to_rpn, val._read): + try: fn(bad) + except Exception: continue + raise AssertionError("%r accepted by %s" % (bad, fn.__name__)) + +# ------------------------------------------------------------ validity, worked by hand +def test_validity_hand(): + # 1. Modus ponens. Rows (A,B): TT both premises true, B true. TF: A->B false. FT, FF: A false. + # So 1 row with all premises true, no counterexample. Without premise 1, row TF refutes; without premise 2, row FF refutes. + prem, c = [P("A -> B"), P("A")], P("B") + assert gen.arg_stats(prem, c) == (["A", "B"], 1, 0) and gen.essential_premises(prem, c) == [1, 2] + # 2. Affirming the consequent. Premises true in TT and FT (2 rows); in FT the conclusion A is false (1 counterexample). + assert gen.arg_stats([P("A -> B"), P("B")], P("A")) == (["A", "B"], 2, 1) + # 3. Precedence: "A | B -> C" is (A | B) -> C. With ~C true, C is false, so A | B must be false: only A=F,B=F,C=F (1 row), + # where ~A & ~B is true. Read wrongly as A | (B -> C) it would be 3 rows (A,B = TT, TF, FF with C false). + assert gen.arg_stats([P("A | B -> C"), P("~C")], P("~A & ~B")) == (["A", "B", "C"], 1, 0) + # 4. Premises that cannot all be true: A, ~A therefore B. 0 premise rows, so valid. Dropping either premise lets B be false. + prem, c = [P("A"), P("~A")], P("B") + assert gen.arg_stats(prem, c) == (["A", "B"], 0, 0) and gen.essential_premises(prem, c) == [1, 2] + # 5. An idle premise: A -> B, C, A therefore B. Over A,B,C (8 rows) all premises hold only at A=T,B=T,C=T. + # Premise 2 (C) can go; premises 1 and 3 cannot. + prem, c = [P("A -> B"), P("C"), P("A")], P("B") + assert gen.arg_stats(prem, c) == (["A", "B", "C"], 1, 0) and gen.essential_premises(prem, c) == [1, 3] + # 6. Grouping to the right: A -> B -> A is A -> (B -> A), true in all 4 rows; B is false in 2 of them. + # (Grouped to the left it would be (A -> B) -> A, true in only 2 rows.) + assert gen.arg_stats([P("A -> B -> A")], P("B")) == (["A", "B"], 4, 2) + # 7. Disjunctive syllogism gone wrong: A | B, A therefore ~B. Premises true in TT and TF; TT is the one counterexample. + assert gen.arg_stats([P("A | B"), P("A")], P("~B")) == (["A", "B"], 2, 1) + +# ------------------------------------------------------------ consistency, worked by hand +def test_consistency_hand(): + # 1. {A | B, ~A, ~B}. TT: 1 true. TF: A|B and ~B, 2 true. FT: 2 true. FF: ~A and ~B, 2 true. No model; at most 2 together. + # Deleting any one sentence leaves a satisfiable pair. + st = gen.set_stats([P("A | B"), P("~A"), P("~B")]) + assert (st["models"], st["most"], st["restoring"]) == (0, 2, [1, 2, 3]) + # 2. {A -> B, B -> C, A}: A true forces B then C. One model, TTT; every atom forced true. + st = gen.set_stats([P("A -> B"), P("B -> C"), P("A")]) + assert (st["models"], st["most"], st["forced_true"], st["forced_false"]) == (1, 3, ["A", "B", "C"], []) + # 3. {A | B, ~A | ~B}: exactly one of A, B true. Models TF and FT; nothing forced. + st = gen.set_stats([P("A | B"), P("~A | ~B")]) + assert (st["models"], st["forced_true"], st["forced_false"]) == (2, [], []) + # 4. {A <-> B, A & ~B, C}: sentences 1 and 2 clash. Best rows make 2 true. Deleting 1 or 2 restores; deleting 3 does not. + st = gen.set_stats([P("A <-> B"), P("A & ~B"), P("C")]) + assert (st["models"], st["most"], st["restoring"]) == (0, 2, [1, 2]) + # 5. {P, P -> Q, ~Q | R, ~R}: P gives Q gives R, against ~R. P=T,Q=T,R=F makes 3 true. Any single deletion restores. + st = gen.set_stats([P("P"), P("P -> Q"), P("~Q | R"), P("~R")]) + assert (st["models"], st["most"], st["restoring"]) == (0, 3, [1, 2, 3, 4]) + # 6. {A & ~B, C -> B, A | C}: A=T, B=F, so C=F. One model; A forced true, B and C forced false. + st = gen.set_stats([P("A & ~B"), P("C -> B"), P("A | C")]) + assert (st["models"], st["forced_true"], st["forced_false"]) == (1, ["A"], ["B", "C"]) + +# ------------------------------------------------------------ equivalence, worked by hand +def test_equivalence_hand(): + def st(l, r_): + s = gen.pair_stats(P(l), P(r_)); return (s["left_models"], s["right_models"], s["left_only"], s["right_only"], s["relation"]) + # 1. De Morgan: both false only at TT. 3 models each. + assert st("~(A & B)", "~A | ~B") == (3, 3, 0, 0, "equivalent") + # 2. Conditional and converse: A -> B true at TT, FT, FF; B -> A true at TT, TF, FF. They differ at FT and TF. + assert st("A -> B", "B -> A") == (3, 3, 1, 1, "neither") + # 3. A & B (TT only) against A | B (TT, TF, FT). + assert st("A & B", "A | B") == (1, 3, 0, 2, "left-entails-right") + assert st("A | B", "A & B") == (3, 1, 2, 0, "right-entails-left") + # 4. Absorption, counted over both atoms A and B: each side is true in the 2 rows with A true. + assert st("A & (A | B)", "A") == (2, 2, 0, 0, "equivalent") + # 5. A <-> B <-> C is A <-> (B <-> C): true at TTT, TFF, FTF, FFT (4 rows). (A <-> B) & (B <-> C) is true at TTT, FFF. + # Left only: TFF, FTF, FFT (3). Right only: FFF (1). + assert st("A <-> B <-> C", "(A <-> B) & (B <-> C)") == (4, 2, 3, 1, "neither") + # 6. Exportation: (A & B) -> C and A -> (B -> C) are both false only at TTF. 7 models each. + assert st("A & B -> C", "A -> B -> C") == (7, 7, 0, 0, "equivalent") + # normal forms are judged on the parsed tree + nf = gen.is_normal_form + assert nf(P("(A | ~B) & C"), "cnf") and nf(P("A | B"), "cnf") and nf(P("~A"), "cnf") and nf(P("A & B"), "cnf") + assert not nf(P("A | B & C"), "cnf") and nf(P("A | B & C"), "dnf") and nf(P("A & ~B | C"), "dnf") + assert not nf(P("~(A | B)"), "cnf") and not nf(P("~(A | B)"), "dnf") and not nf(P("A -> B"), "cnf") and not nf(P("~~A"), "dnf") + assert not nf(P("(A | B) & C"), "dnf") and nf(P("(A | (B | ~C)) & ((D | A) & B)"), "cnf") + +# ------------------------------------------------------------ validators +def test_counterexample_validator(): + args = {"id": "ARG01", "premises": ["A -> B", "B"], "conclusion": "A"} # only counterexample: A false, B true + def a(x): return {"arguments": {"ARG01": {"counterexample": x}}} + assert val.counterexample(a({"A": False, "B": True}), args) is True + wrong = [{"A": True, "B": True}, # conclusion true + {"A": False, "B": False}, # premise B false + {"A": True, "B": False}, # premise A -> B false + {"A": False}, # atom missing + {"A": False, "B": True, "C": True}, # atom that does not occur + {"A": 0, "B": 1}, # not booleans + {"A": "false", "B": "true"}, None, [False, True], "A=F,B=T", {}] + for w in wrong: assert val.counterexample(a(w), args) is False, w + for junk in [None, {}, [], "x", 3, {"arguments": None}, {"arguments": {"ARG02": {"counterexample": {"A": False, "B": True}}}}, {"arguments": {"ARG01": [1]}}]: + assert val.counterexample(junk, args) is False + # precedence matters to the validator too: (A | B) -> C, ~C therefore A has the single counterexample FFF + args2 = {"id": "X", "premises": ["A | B -> C", "~C"], "conclusion": "A"} + assert val.counterexample({"arguments": {"X": {"counterexample": {"A": False, "B": False, "C": False}}}}, args2) is True + assert val.counterexample({"arguments": {"X": {"counterexample": {"A": False, "B": True, "C": False}}}}, args2) is False + +def test_satisfying_validator(): + args = {"id": "SET01", "sentences": ["A | B", "~A | ~B", "B -> C"]} # models: TFT, TFF, FTT + def a(x): return {"sets": {"SET01": {"valuation": x}}} + for ok in [{"A": True, "B": False, "C": False}, {"A": True, "B": False, "C": True}, {"A": False, "B": True, "C": True}]: + assert val.satisfying_valuation(a(ok), args) is True + wrong = [{"A": True, "B": True, "C": True}, # sentence 2 false + {"A": False, "B": True, "C": False}, # sentence 3 false + {"A": False, "B": False, "C": True}, # sentence 1 false + {"A": True, "B": False}, # atom missing + {"A": True, "B": False, "C": False, "D": False}, # extra atom + {"A": 1, "B": 0, "C": 0}, {"a": True, "b": False, "c": False}, None, "TFF", []] + for w in wrong: assert val.satisfying_valuation(a(w), args) is False, w + for junk in [None, {}, [], 3, {"sets": []}, {"sets": {"SET01": None}}]: assert val.satisfying_valuation(junk, args) is False + +def test_distinguishing_validator(): + args = {"id": "PAIR01", "left": "A -> B", "right": "B -> A"} # they differ at FT and TF + def a(x): return {"pairs": {"PAIR01": {"distinguishing": x}}} + assert val.distinguishing_valuation(a({"A": False, "B": True}), args) is True + assert val.distinguishing_valuation(a({"A": True, "B": False}), args) is True + wrong = [{"A": True, "B": True}, # both true + {"A": False, "B": False}, # both true + {"A": False}, # atom missing + {"A": False, "B": True, "Z": True}, # extra atom + {"A": "F", "B": "T"}, {"A": None, "B": True}, None, 1, [{"A": False, "B": True}]] + for w in wrong: assert val.distinguishing_valuation(a(w), args) is False, w + # atoms are those of either formula: A & (A | B) against A & B differ at A true, B false; B must be given + args2 = {"id": "P", "left": "A & (A | B)", "right": "A & B"} + assert val.distinguishing_valuation({"pairs": {"P": {"distinguishing": {"A": True, "B": False}}}}, args2) is True + assert val.distinguishing_valuation({"pairs": {"P": {"distinguishing": {"A": True}}}}, args2) is False + for junk in [None, {}, [], "x", {"pairs": 5}]: assert val.distinguishing_valuation(junk, args) is False + +def test_normal_form_validator(): + # A -> B & C is A -> (B & C), equivalent to (~A | B) & (~A | C) + cnf = {"id": "F01", "formula": "A -> B & C", "form": "cnf"} + dnf = {"id": "F01", "formula": "A -> B & C", "form": "dnf"} + def a(x, form="cnf"): return {form: {"F01": x}} + for ok in ["(~A | B) & (~A | C)", "((~A|B))&(C|~A)", "(B | ~A) & (~A | C) & (~A | B | C)", "(~A | B | B) & (C | ~A)"]: + assert val.normal_form(a(ok), cnf) is True, ok + wrong = ["~A | B & C", # equivalent, but parses as ~A | (B & C): not a CNF + "(~A | B) & (A | C)", # CNF, not equivalent + "(~A | B) & (~A | C) & (D | ~D)", # atom D does not occur in the formula + "A -> B & C", # the formula itself: not a normal form + "~(A & ~B) & (~A | C)", # negation of a compound + "(~~~A | B) & (~A | C)", # ~~~A is not a literal + "(~A | B) & (~A | C", # does not parse + "(~A | B) & (~A | C) " + "& (~A | C) " * 200, # longer than 2000 characters + "", None, 5, ["(~A | B) & (~A | C)"], {"f": "(~A | B) & (~A | C)"}] + for w in wrong: assert val.normal_form(a(w), cnf) is False, w + for ok in ["~A | B & C", "~A | (B & C)", "(~A & B) | (~A & ~B) | (B & C)"]: + assert val.normal_form(a(ok, "dnf"), dnf) is True, ok + for w in ["(~A | B) & (~A | C)", "~A | B", "~A | B & C | D & ~D", "~(A & ~(B & C))", "~A | B & C |", None]: + assert val.normal_form(a(w, "dnf"), dnf) is False, w + assert val.normal_form({"dnf": {"F01": "(~A | B) & (~A | C)"}}, cnf) is False # right text under the wrong key + assert val.normal_form(a("(~A | B) & (~A | C)"), {"id": "F01", "formula": "A -> B & C", "form": "nnf"}) is False + assert val.normal_form(a("(" * 1500 + "A" + ")" * 1500), cnf) is False # deep nesting must not raise + for junk in [None, {}, [], "x", {"cnf": "x"}, {"cnf": {"F02": "(~A | B) & (~A | C)"}}]: assert val.normal_form(junk, cnf) is False + +def test_validators_against_generator(): + """On generated tasks, each valuation validator accepts exactly the rows gen.py's own evaluator says qualify, + and the normal-form validator accepts the truth-table forms and rejects the same forms with one literal flipped.""" + seen = {"counterexample": 0, "satisfying_valuation": 0, "distinguishing_valuation": 0, "normal_form": 0} + for seed in range(45): + for d in (1, 2, 3): + t = gen.generate(seed, d) + for c in t.checks: + if c["type"] != "custom": continue + g = c["args"]; seen[c["name"]] += 1 + if c["name"] == "counterexample": + fs = [P(x) for x in g["premises"]]; con = P(g["conclusion"]); atoms = gen.atoms_of(fs + [con]); n_ok = 0 + for v in gen.table(atoms): + want = all(gen.ev(f, v) for f in fs) and not gen.ev(con, v); n_ok += want + assert val.counterexample({"arguments": {g["id"]: {"counterexample": v}}}, g) is want + assert n_ok >= 1 + elif c["name"] == "satisfying_valuation": + fs = [P(x) for x in g["sentences"]]; n_ok = 0 + for v in gen.table(gen.atoms_of(fs)): + want = all(gen.ev(f, v) for f in fs); n_ok += want + assert val.satisfying_valuation({"sets": {g["id"]: {"valuation": v}}}, g) is want + assert n_ok >= 1 + elif c["name"] == "distinguishing_valuation": + l, r_ = P(g["left"]), P(g["right"]); n_ok = 0 + for v in gen.table(gen.atoms_of([l, r_])): + want = gen.ev(l, v) != gen.ev(r_, v); n_ok += want + assert val.distinguishing_valuation({"pairs": {g["id"]: {"distinguishing": v}}}, g) is want + assert n_ok >= 1 + else: + f = P(g["formula"]); atoms = gen.atoms_of([f]); rows = gen.table(atoms); form = g["form"] + if form == "cnf": parts = ["(" + " | ".join(("~" if v[x] else "") + x for x in atoms) + ")" for v in rows if not gen.ev(f, v)] + else: parts = ["(" + " & ".join(("" if v[x] else "~") + x for x in atoms) + ")" for v in rows if gen.ev(f, v)] + good = (" & " if form == "cnf" else " | ").join(parts) + assert val.normal_form({form: {g["id"]: good}}, g) is True + a0 = atoms[0] + flipped = good.replace("(~" + a0, "(#", 1) if good.startswith("(~" + a0) else good.replace("(" + a0, "(~" + a0, 1) + flipped = flipped.replace("(#", "(" + a0) + assert flipped != good and val.normal_form({form: {g["id"]: flipped}}, g) is False + assert val.normal_form({form: {g["id"]: g["formula"]}}, g) is False # the unconverted formula + other = "dnf" if form == "cnf" else "cnf" + if len(parts) > 1 and len(atoms) > 1: + assert val.normal_form({form: {g["id"]: good.replace("&", "#").replace("|", "&").replace("#", "|")}}, g) is False + assert all(n > 20 for n in seen.values()), seen + +def test_generated_tasks_are_balanced(): + for fam, key in (("validity", "valid"), ("consistency", "satisfiable"), ("equivalence", "equivalent")): + for d in (1, 2, 3): + yes = no = 0 + for seed in range(40): + for c in gen.generate(seed, d, fam).checks: + if c["type"] == "bool" and c["path"].endswith("." + key): yes += c["value"]; no += not c["value"] + assert 0.42 <= yes / float(yes + no) <= 0.58, (fam, d, yes, no) + +if __name__ == "__main__": + tests = [(k, v) for k, v in sorted(globals().items()) if k.startswith("test_") and callable(v)] + for name, fn in tests: + fn(); print("ok " + name) + print("argument_check: %d tests passed" % len(tests)) diff --git a/tests/test_emissions_inventory.py b/tests/test_emissions_inventory.py new file mode 100644 index 0000000000000000000000000000000000000000..998cad547d1d7c784ef996efe7743adfec0de40a --- /dev/null +++ b/tests/test_emissions_inventory.py @@ -0,0 +1,87 @@ +#!/usr/bin/env python3 +"""Hand-worked cases for Emissions Inventory. Run: python3 tests/test_emissions_inventory.py""" +import os, sys +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from envs.emissions_inventory import gen as G + +def close(a, b, tol=1e-6): assert abs(a - b) <= tol, (a, b) + +# ---------------------------------------------------------------- activity data +# Case 1: 1200 litres of diesel at 2.5 kg CO2e per litre = 3000 kg = 3.0 t. +close(G.emission_t(1200, 1.0, 2.5), 3.0) +# Case 2: 2.5 MWh of electricity = 2500 kWh; at 0.4 kg per kWh = 1000 kg = 1.0 t. +close(G.emission_t(2.5, 1000, 0.4), 1.0) +# Case 3: 500 m3 of natural gas at 10.5 kWh per m3 = 5250 kWh; at 0.2 kg per kWh = 1050 kg = 1.05 t. +close(G.emission_t(500, 10.5, 0.2), 1.05) +# Case 4: 100 miles = 160.9344 km; at 0.25 kg per km = 40.2336 kg = 0.0402336 t. +close(G.emission_t(100, 1.609344, 0.25), 0.0402336) +# Case 5: 750 kg of waste = 0.75 t; at 400 kg CO2e per tonne = 300 kg = 0.3 t. +close(G.emission_t(750, 0.001, 400), 0.3) +# Case 6: 36 GJ of district heat = 36 x 277.78 = 10000.08 kWh; at 0.1 kg per kWh = 1000.008 kg = 1.000008 t. +close(G.emission_t(36, 277.78, 0.1), 1.000008) + +# ---------------------------------------------------------------- multi-gas +# The shipped GWP tables are the published AR4 and AR5 100-year values. +assert G.GWP["AR4"][1] == {"CO2": 1, "CH4": 25, "N2O": 298, "HFC-134a": 1430, "HFC-32": 675, "SF6": 22800} +assert G.GWP["AR5"][1] == {"CO2": 1, "CH4": 28, "N2O": 265, "HFC-134a": 1300, "HFC-32": 677, "SF6": 23500} +# Case 1: 1000 litres at 2.5 kg CO2, 0.4 g CH4 and 0.1 g N2O per litre: +# CO2 = 2500 kg = 2.5 t; CH4 = 400 g = 0.4 kg; N2O = 100 g = 0.1 kg. +co2, ch4, n2o = G.gas_masses(1000, 2.5, 0.4, 0.1) +close(co2, 2.5); close(ch4, 0.4); close(n2o, 0.1) +# AR4: 2.5 + 0.4 x 25 / 1000 + 0.1 x 298 / 1000 = 2.5 + 0.0100 + 0.0298 = 2.5398 t CO2e. +close(G.co2e_t(co2, ch4, n2o, 25, 298), 2.5398) +# AR5: 2.5 + 0.4 x 28 / 1000 + 0.1 x 265 / 1000 = 2.5 + 0.0112 + 0.0265 = 2.5377 t CO2e. +close(G.co2e_t(co2, ch4, n2o, 28, 265), 2.5377) +# Case 2: 10 t of landfilled waste at 50 000 g CH4 per tonne = 500 kg CH4, no CO2 or N2O; AR5: 500 x 28 / 1000 = 14.0 t CO2e. +co2, ch4, n2o = G.gas_masses(10, 0.0, 50000.0, 0.0) +close(co2, 0.0); close(ch4, 500.0); close(n2o, 0.0); close(G.co2e_t(co2, ch4, n2o, 28, 265), 14.0) +# Case 3: 100 dairy cows at 120 000 g CH4 and 1000 g N2O per head = 12 000 kg CH4 and 100 kg N2O; +# AR4: 12000 x 25 / 1000 + 100 x 298 / 1000 = 300 + 29.8 = 329.8 t CO2e. +co2, ch4, n2o = G.gas_masses(100, 0.0, 120000.0, 1000.0) +close(ch4, 12000.0); close(n2o, 100.0); close(G.co2e_t(co2, ch4, n2o, 25, 298), 329.8) +# Case 4: 2 t of fertiliser nitrogen at 15 700 g N2O per tonne = 31.4 kg N2O; AR5: 31.4 x 265 / 1000 = 8.321 t CO2e. +co2, ch4, n2o = G.gas_masses(2, 0.0, 0.0, 15700.0) +close(n2o, 31.4); close(G.co2e_t(co2, ch4, n2o, 28, 265), 8.321) + +# ---------------------------------------------------------------- time series +# Changes: 100 -> 90 is -10 %; 100 -> 110 is +10 %; 1500 -> 1200 is -300 / 1500 = -20 %. +close(G.percent_change(90, 100), -10.0); close(G.percent_change(110, 100), 10.0); close(G.percent_change(1200, 1500), -20.0) +# Intensity: 500 t over 25 000 units = 500 000 kg / 25 000 = 20 kg per unit. +close(G.intensity_kg_per_unit(500, 25000), 20.0) +# Target: 40 % below 1000 t = 600 t. 42 % below 2500 t = 2500 x 0.58 = 1450 t. +close(G.target_level(1000, 40), 600.0); close(G.target_level(2500, 42), 1450.0) +# Equal cut: from 900 t to 600 t in 6 years = 300 / 6 = 50 t per year. +close(G.linear_annual_cut(900, 600, 6), 50.0) +# Constant-rate cut: 800 t to 200 t in 2 years: 1 - sqrt(0.25) = 0.5 -> 50 %. Check: 800 x 0.5 x 0.5 = 200. +close(G.compound_annual_cut_percent(800, 200, 2), 50.0) +# 1000 t to 729 t in 3 years: 1 - 0.729^(1/3) = 1 - 0.9 = 10 %. Check: 1000 x 0.9^3 = 729. +close(G.compound_annual_cut_percent(1000, 729, 3), 10.0) +# Straight line from 1000 t (2015) to 600 t (2025): 40 t per year; 2020 -> 800 t; 2018 -> 880 t; 2025 -> 600 t. +close(G.linear_path(1000, 600, 2015, 2025, 2020), 800.0); close(G.linear_path(1000, 600, 2015, 2025, 2018), 880.0); close(G.linear_path(1000, 600, 2015, 2025, 2025), 600.0) + +# ---------------------------------------------------------------- data quality +# A missing month takes the mean of its neighbours: (100 + 200) / 2 = 150; (301 + 302) / 2 = 301.5; (0 + 50) / 2 = 25. +close(G.fill_gap(100, 200), 150.0); close(G.fill_gap(301, 302), 301.5); close(G.fill_gap(0, 50), 25.0) +# A generated file, recounted here in a few lines: rows minus duplicates plus filled months gives 12 months per meter, +# and the checks agree with the recount. +import csv, io +for d in (1, 2, 3): + t = G.generate(11, d, "data-quality") + seen, dup = {}, 0 + for row in csv.DictReader(io.StringIO(t.files["meter_readings.csv"])): + key = (row["meter_id"], row["month"]) + kwh = float(row["consumption"]) * (1000 if row["unit"] == "MWh" else 1) + if key in seen: + dup += 1; assert abs(seen[key] - kwh) < 1e-6 + else: seen[key] = kwh + want = dict((c["path"], c["value"]) for c in t.checks if "path" in c) + assert want["duplicate_rows_removed"] == dup + filled = [p for p in want if p.startswith("filled.")] + assert len(seen) + len(filled) == 12 * len(set(m for m, _ in seen)) + close(want["total_kwh"], sum(seen.values()) + sum(want[p] for p in filled), 0.11) + +for d in (1, 2, 3): + for fam in G.FAMILIES: + t = G.generate(3, d, fam) + assert t.family == fam and 6 <= len(t.checks) <= 45, (fam, d, len(t.checks)) +print("test_emissions_inventory: all passed") diff --git a/tests/test_harris_matrix.py b/tests/test_harris_matrix.py new file mode 100644 index 0000000000000000000000000000000000000000..5d5421ec2b204143e9d2305b6cafafaba401c5d7 --- /dev/null +++ b/tests/test_harris_matrix.py @@ -0,0 +1,44 @@ +"""Hand-worked graph examples and adversarial sequence checks.""" +import sys +from pathlib import Path +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +from envs.harris_matrix.gen import earlier_sets,unit_levels,redundant_pairs,unrelated_count,tpq_taq,classes_on_cycle +from envs.harris_matrix.validators import valid_sequence +# A -> B -> C: ancestors {},{A},{A,B}, levels 1,2,3. +assert earlier_sets(3,[(0,1),(1,2)])==[set(),{0},{0,1}] +assert unit_levels(3,[(0,1),(1,2)])==[1,2,3] +assert unit_levels(3,[])==[1,1,1] +assert unit_levels(4,[(0,2),(1,2),(2,3)])==[1,1,2,3] +# Reduction: triangle removes only A->C; chain and fork have no redundant edges. +assert redundant_pairs(3,[(0,1),(1,2),(0,2)])=={(0,2)} +assert redundant_pairs(3,[(0,1),(1,2)])==set() +assert redundant_pairs(3,[(0,1),(0,2)])==set() +# TPQ inherits newest find below, TAQ propagates documented date downwards. +assert tpq_taq(3,[(0,1),(1,2)],{0:[100],1:[150],2:[]},{})==([100,150,150],[None,None,None]) +assert tpq_taq(2,[(0,1)],{0:[],1:[]},{1:200})==([None,200],[200,200]) +assert tpq_taq(2,[],{0:[100],1:[]},{})==([100,None],[None,None]) +assert classes_on_cycle(3,[(0,1),(1,0),(1,2)])==[[0,1]] +assert classes_on_cycle(3,[(0,1),(1,2),(2,0)])==[[0,1,2]] +assert classes_on_cycle(3,[(0,1),(1,2)])==[] +args={'contexts':['A','B','C','D'],'relations':[['A','same as','B'],['C','overlies','A']]} +assert valid_sequence({'sequence':['A','B','C','D']},args) +for wrong in [None,{}, {'sequence':['A','B','C']},{'sequence':['A','A','C','D']},{'sequence':['C','A','B','D']},{'sequence':['A','D','B','C']},{'sequence':['A','B','C',{}]}]: assert not valid_sequence(wrong,args) +print('harris_matrix: 3 hand-worked cases per family and validator rejection cases passed') +# Exhaustively verify uniqueness of the planted repair for each difficulty. +# Deleting a same-as row must never offer an alternative way to hide the cycle. +from itertools import combinations +from envs.harris_matrix.gen import generate,record_consistent +import csv,io +for difficulty in (1,2,3): + task=generate(7,difficulty,'errors') + contexts=[r['context_id'] for r in csv.DictReader(io.StringIO(task.files['contexts.csv']))] + relations=list(csv.DictReader(io.StringIO(task.files['relations.csv']))) + k=2 if difficulty==3 else 1 + expected=next(c['value'] for c in task.checks if c.get('path')=='faulty_relations') + repairs=[] + for n in range(1,k+1): + for drop in combinations(range(len(relations)),n): + rows=[(r['context_a'],r['relation'],r['context_b']) for i,r in enumerate(relations) if i not in drop] + if record_consistent(contexts,rows): repairs.append(sorted(relations[i]['relation_id'] for i in drop)) + assert repairs==[expected],repairs +print('harris_matrix: unique minimal repair verified at all 3 difficulties') diff --git a/tests/test_life_table.py b/tests/test_life_table.py new file mode 100644 index 0000000000000000000000000000000000000000..039b9ac376224693b033657a2d3c4bf14731e833 --- /dev/null +++ b/tests/test_life_table.py @@ -0,0 +1,137 @@ +"""Hand-worked cases for Life Table. Run: python3 tests/test_life_table.py""" +import os, sys +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from envs.life_table import gen + +def near(a, b, tol): return abs(float(a) - float(b)) <= tol + +# ------------------------------------------------------------ life table +def test_lt_four_groups(): + # age 0: P 1000, D 20, m 0.02, a 0.1: q = 0.02 / (1 + 0.9 * 0.02) = 0.02 / 1.018 = 0.0196464 + # 1-4: P 4000, D 4, m 0.001, a 1.5: q = 0.004 / (1 + 2.5 * 0.001) = 0.004 / 1.0025 = 0.0039900 + # 5-64: n 60, m 0.005, a 30: q = 0.3 / (1 + 30 * 0.005) = 0.3 / 1.15 = 0.2608696 + # 65+: m 0.08: q = 1 + # l: 100000 -> 98035.36 -> 97644.20 -> 72171.80 + # d: 1964.64, 391.16, 25472.40 + # L0 = 98035.36 + 0.1 * 1964.64 = 98231.83 + # L1 = 4 * 97644.20 + 1.5 * 391.16 = 391163.5 + # L5 = 60 * 72171.80 + 30 * 25472.40 = 5094480 + # L65 = 72171.80 / 0.08 = 902147.5 + # T0 = 6486022.8 -> e0 = 64.860; T65 / l65 = 1 / 0.08 = 12.5 + t = gen.life_table([(0, 1, 20 / 1000.0), (1, 4, 4 / 4000.0), (5, 60, 0.005), (65, None, 0.08)], 0.1, 1.5) + assert near(t[0]["q"], 0.0196464, 1e-7) and near(t[1]["q"], 0.0039900, 1e-7) and near(t[2]["q"], 0.2608696, 1e-7) and t[3]["q"] == 1.0 + assert near(t[1]["l"], 98035.36, 0.01) and near(t[2]["l"], 97644.20, 0.01) and near(t[3]["l"], 72171.80, 0.01) + assert near(t[0]["L"], 98231.83, 0.01) and near(t[1]["L"], 391163.5, 0.1) and near(t[2]["L"], 5094480, 2) and near(t[3]["L"], 902147.5, 0.2) + assert near(t[0]["T"], 6486022.8, 3) and near(t[0]["e"], 64.860, 0.001) and near(t[3]["e"], 12.5, 1e-9) + +def test_lt_two_groups(): + # 0-4: n 5, m 0.01, a 2.5 (not the single-year age 0, so a = n / 2): q = 0.05 / 1.025 = 0.0487805 + # l5 = 95121.95, d = 4878.05, L0 = 5 * 95121.95 + 2.5 * 4878.05 = 487804.88 + # 5+: m 0.02: L = 95121.95 / 0.02 = 4756097.56. T0 = 5243902.44, e0 = 52.439, e5 = 50 + t = gen.life_table([(0, 5, 0.01), (5, None, 0.02)], 0.1, 1.5) + assert t[0]["a"] == 2.5 and near(t[0]["q"], 0.0487805, 1e-7) + assert near(t[1]["l"], 95121.95, 0.01) and near(t[0]["L"], 487804.88, 0.01) and near(t[0]["e"], 52.439, 0.001) and near(t[1]["e"], 50, 1e-9) + # one open interval only: constant death rate 0.0125 gives e0 = 1 / 0.0125 = 80 + assert near(gen.life_table([(0, None, 0.0125)], 0.1, 1.5)[0]["e"], 80, 1e-9) + +def test_lt_published_first_rows(): + # Preston, Heuveline and Guillot (2001), Box 3.1, Austrian males 1992 (first two rows, quoted from the book): + # age 0: m = 0.008743, a = 0.068 -> q = 0.008743 / (1 + 0.932 * 0.008743) = 0.008743 / 1.0081485 = 0.008672 + # 1-4: m = 0.000370, a = 1.626 -> q = 0.00148 / (1 + 2.374 * 0.00037) = 0.00148 / 1.0008784 = 0.001479 + # l1 = 100000 * (1 - 0.008672) = 99133; L0 = 99133 + 0.068 * 867 = 99192 + t = gen.life_table([(0, 1, 0.008743), (1, 4, 0.000370), (5, None, 0.02)], 0.068, 1.626) + assert near(t[0]["q"], 0.008672, 5e-7) and near(t[1]["q"], 0.001479, 5e-7) + assert near(t[1]["l"], 99133, 0.5) and near(t[0]["L"], 99192, 0.5) + # a different a for age 0 changes q: a 0.3 -> 0.02 / (1 + 0.7 * 0.02) = 0.0197239 + assert near(gen.life_table([(0, 1, 0.02), (1, None, 0.01)], 0.3, 1.6)[0]["q"], 0.0197239, 1e-7) + +# ------------------------------------------------------------ fertility +def test_fertility_share(): + # 1000 women in every group, births 20 80 120 100 50 20 10: ASFR 0.020 ... sum 0.400, TFR = 5 * 0.4 = 2.0 + # GRR = 2.0 * 0.488 = 0.976 + # mean age = (17.5*20 + 22.5*80 + 27.5*120 + 32.5*100 + 37.5*50 + 42.5*20 + 47.5*10) / 400 + # = (350 + 1800 + 3300 + 3250 + 1875 + 850 + 475) / 400 = 11900 / 400 = 29.75 + res = gen.fertility([1000] * 7, [20, 80, 120, 100, 50, 20, 10], share_female=0.488) + assert near(res["tfr"], 2.0, 1e-9) and near(res["grr"], 0.976, 1e-9) and near(res["mac"], 29.75, 1e-9) + assert near(res["asfr"][2], 0.12, 1e-12) and res["nrr"] is None + +def test_fertility_unequal_women(): + # women 2000 2500 3000 2500 2000 1500 1000, births 30 200 360 250 100 30 5 + # ASFR 0.015 0.08 0.12 0.10 0.05 0.02 0.005, sum 0.39, TFR 1.95 + # mean age = (0.2625 + 1.8 + 3.3 + 3.25 + 1.875 + 0.85 + 0.2375) / 0.39 = 11.575 / 0.39 = 29.6795 + # 105 boys per 100 girls -> share of girls 100 / 205 = 0.487805, GRR = 1.95 * 0.487805 = 0.951220 + res = gen.fertility([2000, 2500, 3000, 2500, 2000, 1500, 1000], [30, 200, 360, 250, 100, 30, 5], share_female=100.0 / 205.0) + assert near(res["tfr"], 1.95, 1e-9) and near(res["mac"], 29.6795, 1e-4) and near(res["grr"], 0.951220, 1e-6) + +def test_fertility_grr_nrr(): + # 1000 women per group, girls 10 40 58 49 24 10 5 (sum 196): GRR = 5 * 0.196 = 0.98 + # L = 490000 488000 486000 484000 481000 477000 471000 + # NRR = (0.010*490000 + 0.040*488000 + 0.058*486000 + 0.049*484000 + 0.024*481000 + 0.010*477000 + 0.005*471000) / 100000 + # = (4900 + 19520 + 28188 + 23716 + 11544 + 4770 + 2355) / 100000 = 94993 / 100000 = 0.94993 + res = gen.fertility([1000] * 7, [20, 80, 120, 100, 50, 20, 10], female_births=[10, 40, 58, 49, 24, 10, 5], + big_l=[490000, 488000, 486000, 484000, 481000, 477000, 471000]) + assert near(res["grr"], 0.98, 1e-9) and near(res["nrr"], 0.94993, 1e-9) and near(res["tfr"], 2.0, 1e-9) + # with no mortality before 50 (L = 500000 in every group) NRR equals GRR + assert near(gen.fertility([1000] * 7, [20, 80, 120, 100, 50, 20, 10], female_births=[10, 40, 58, 49, 24, 10, 5], big_l=[500000] * 7)["nrr"], 0.98, 1e-9) + +# ------------------------------------------------------------ standardisation +def test_standardisation_two_regions(): + # A: young 8000 people, 8 deaths (0.001); old 2000, 40 deaths (0.02). crude = 48 / 10000 -> 480 per 100000 + # B: young 2000, 3 deaths (0.0015); old 8000, 200 deaths (0.025). crude = 203 / 10000 -> 2030 + # standard 6000 young, 4000 old: + # A: (6000*0.001 + 4000*0.02) / 10000 = 86 / 10000 -> 860; B: (9 + 100) / 10000 -> 1090; ratio 1090 / 860 = 1.267442 + assert near(gen.crude_rate([8000, 2000], [8, 40]), 480, 1e-9) and near(gen.crude_rate([2000, 8000], [3, 200]), 2030, 1e-9) + a = gen.standardised_rate([8000, 2000], [8, 40], [6000, 4000]); b = gen.standardised_rate([2000, 8000], [3, 200], [6000, 4000]) + assert near(a, 860, 1e-9) and near(b, 1090, 1e-9) and near(b / a, 1.267442, 1e-6) + +def test_standardisation_three_bands(): + # population 5000 3000 2000, deaths 5 15 60: rates 0.001 0.005 0.03. crude = 80 / 10000 -> 800 + # standard 40000 35000 25000: (40 + 175 + 750) / 100000 -> 965 per 100000 + assert near(gen.crude_rate([5000, 3000, 2000], [5, 15, 60]), 800, 1e-9) + assert near(gen.standardised_rate([5000, 3000, 2000], [5, 15, 60], [40000, 35000, 25000]), 965, 1e-9) + +def test_standardisation_same_rates(): + # equal age-specific rates but different age structures: crude rates differ, standardised rates are equal + # young-heavy: (9000*0.001 + 1000*0.02) = 29 deaths -> crude 290; old-heavy: (4 + 120) = 124 deaths -> crude 1240 + # standard 1 : 1 -> (0.001 + 0.02) / 2 = 0.0105 -> 1050 for both + assert near(gen.crude_rate([9000, 1000], [9, 20]), 290, 1e-9) and near(gen.crude_rate([4000, 6000], [4, 120]), 1240, 1e-9) + assert near(gen.standardised_rate([9000, 1000], [9, 20], [500, 500]), 1050, 1e-9) + assert near(gen.standardised_rate([4000, 6000], [4, 120], [500, 500]), 1050, 1e-9) + # a standard equal to the region's own population gives back the crude rate + assert near(gen.standardised_rate([4000, 6000], [4, 120], [4000, 6000]), 1240, 1e-9) + +# ------------------------------------------------------------ age structure +def test_age_broad_groups(): + # groups 0-14 200, 15-29 280, 30-44 270, 45-64 150, 65-79 80, 80+ 20: total 1000 + # young 200, working 700, old 100: ratios 28.5714, 14.2857, total 42.8571, ageing index 50 + # median: N / 2 = 500; cumulative 200, 480, 750 -> group 30-44: 30 + (500 - 480) / 270 * 15 = 31.1111 + v = gen.age_structure([200, 280, 270, 150, 80, 20], [0, 15, 30, 45, 65, 80]) + assert v["total"] == 1000 and near(v["young"], 28.5714, 1e-4) and near(v["old"], 14.2857, 1e-4) and near(v["dep"], 42.8571, 1e-4) + assert near(v["ageing"], 50, 1e-9) and near(v["median"], 31.1111, 1e-4) + assert near(v["s_young"], 20, 1e-9) and near(v["s_work"], 70, 1e-9) and near(v["s_old"], 10, 1e-9) + +def test_age_five_year_groups(): + # nineteen five-year groups (0-4 ... 85-89, 90+) of 100 people each: total 1900 + # young 300 (three groups), old 600 (65-69 ... 90+), working 1000: ratios 30 and 60, total 90, ageing index 200 + # median: N / 2 = 950; the nine groups under 45 hold 900 -> 45 + (950 - 900) / 100 * 5 = 47.5 + v = gen.age_structure([100] * 19, list(range(0, 95, 5))) + assert near(v["young"], 30, 1e-9) and near(v["old"], 60, 1e-9) and near(v["dep"], 90, 1e-9) and near(v["ageing"], 200, 1e-9) and near(v["median"], 47.5, 1e-9) + +def test_grouped_median(): + # 10, 30, 60, 0 people in groups starting at 0, 5, 10, 15: N / 2 = 50; cumulative 10, 40 -> 10 + (50 - 40) / 60 * 5 = 10.8333 + assert near(gen.grouped_median([10, 30, 60, 0], [0, 5, 10, 15]), 10.8333, 1e-4) + # 40, 40, 20: N / 2 = 50 -> second group: 5 + (50 - 40) / 40 * 5 = 6.25 + assert near(gen.grouped_median([40, 40, 20], [0, 5, 10]), 6.25, 1e-9) + +def test_generated_tasks(): + for fam in sorted(gen.FAMILIES): + for d in (1, 2, 3): + for seed in range(8): + t = gen.generate(seed, d, fam) + assert 6 <= len(t.checks) <= 40, (t.id, len(t.checks)) + assert "methods.md" in t.files and "—" not in t.instruction + t.files["methods.md"] + +if __name__ == "__main__": + tests = [v for k, v in sorted(globals().items()) if k.startswith("test_")] + for t in tests: t() + print("test_life_table: %d tests passed" % len(tests)) diff --git a/tests/test_price_index.py b/tests/test_price_index.py new file mode 100644 index 0000000000000000000000000000000000000000..4f56365a0308805460933c538290831a6139d570 --- /dev/null +++ b/tests/test_price_index.py @@ -0,0 +1,32 @@ +"""Small hand-computed examples independent of randomly generated records.""" +import math,sys +from pathlib import Path +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +from envs.price_index.gen import price_indices,chain_index,gini,median,quintile_shares,contributions,equivalence_scale +# One item: both indices equal its price relative regardless of quantity. +assert price_indices({'a':2},{'a':3},{'a':3},{'a':7})==(150,150,150) +# Unchanged prices -> 100 even after quantities change. +assert price_indices({'a':2,'b':4},{'a':1,'b':2},{'a':2,'b':4},{'a':3,'b':1})==(100,100,100) +# L=100*(4+4)/(2+4), P=100*(12+4)/(6+4). +l,p,f=price_indices({'a':2,'b':4},{'a':1,'b':1},{'a':4,'b':4},{'a':3,'b':1}) +assert abs(l-400/3)<1e-9 and p==160 and abs(f-math.sqrt(l*p))<1e-9 +# Volume links 2 and 1.5, independent of changes in price. +ps=[{'a':2},{'a':4},{'a':8}]; qs=[{'a':10},{'a':20},{'a':30}] +assert chain_index(ps,qs,0)==[100,200,300] +assert chain_index(ps,qs,1)==[50,100,150] +assert chain_index([{'a':1},{'a':9}],[{'a':4},{'a':4}],0)==[100,100] +# Equal incomes G=0, [0,0,0,0,10] has 4/5 inequality, [1,2,3,4,5] gives 4/15. +assert gini([10]*5)==0 +assert abs(gini([0,0,0,0,10])-.8)<1e-12 +assert abs(gini([1,2,3,4,5])-4/15)<1e-12 +assert quintile_shares([1,2,3,4,5])==[100/15,200/15,20,400/15,500/15] +assert median([1,3])==2 and equivalence_scale(2,2)==2.1 +# Equal weights, one category +10 and the other unchanged: inflation 5, contributions 5 and 0. +a,b,rate,cs=contributions({'a':1,'b':1},{'a':100,'b':100},{'a':110,'b':100}) +assert (a,b)==(100,105) and abs(rate-5)<1e-10 and cs=={'a':5,'b':0} +# Starting aggregate 200, +20 in each category => 10 percent, 2.5+7.5 points. +a,b,rate,cs=contributions({'a':1,'b':3},{'a':200,'b':200},{'a':220,'b':220}) +assert abs(rate-10)<1e-10 and cs=={'a':2.5,'b':7.5} +# A fall: 100 -> 80 gives -20 points in a one-category index. +assert contributions({'a':5},{'a':100},{'a':80})[3]=={'a':-20} +print('price_index: 3 hand-worked cases per family passed') diff --git a/tests/test_seat_count.py b/tests/test_seat_count.py new file mode 100644 index 0000000000000000000000000000000000000000..1de27744c5b8e1243aa41cba5d148555fc7065ee --- /dev/null +++ b/tests/test_seat_count.py @@ -0,0 +1,138 @@ +"""Hand-worked cases for Seat Count. Run: python3 tests/test_seat_count.py""" +import os, sys +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from fractions import Fraction +from envs.seat_count import gen + +def near(a, b, tol=1e-6): return abs(float(a) - float(b)) <= tol + +# ------------------------------------------------------------ highest averages +# Standard example (Wikipedia, "D'Hondt method"): A 100000, B 80000, C 30000, D 20000, 8 seats. +V = {"A": 100000, "B": 80000, "C": 30000, "D": 20000} + +def test_dhondt(): + # A: 100000 50000 33333 25000 20000 B: 80000 40000 26667 20000 C: 30000 15000 D: 20000 + # eight largest: 100000 80000 50000 40000 33333 30000 26667 25000 -> A 4, B 3, C 1, D 0 + alloc, qs = gen.highest_averages(V, 8, "dhondt") + assert alloc == {"A": 4, "B": 3, "C": 1, "D": 0}, alloc + assert qs[7] == (Fraction(25000), "A") # last winning quotient is A's 100000 / 4 + assert qs[8][0] == 20000 # first losing quotient (three-way tie, so not a generated case) + +def test_sainte_lague(): + # A: 100000 33333 20000 14286 B: 80000 26667 16000 C: 30000 10000 D: 20000 + # eight largest: 100000 80000 33333 30000 26667 20000(A) 20000(D) 16000(B) -> A 3, B 3, C 1, D 1 + alloc, qs = gen.highest_averages(V, 8, "sainte-lague") + assert alloc == {"A": 3, "B": 3, "C": 1, "D": 1}, alloc + assert qs[7] == (Fraction(16000), "B") and near(qs[8][0], 100000 / 7.0) + +def test_modified_sainte_lague(): + # 7 seats. Plain Sainte-Lague: 100000 80000 33333 30000 26667 20000(A) 20000(D) -> A 3, B 2, C 1, D 1. + # First divisor 1.4: A 71429 33333 20000 B 57143 26667 16000 C 21429 D 14286 + # seven largest: 71429 57143 33333 26667 21429 20000 16000 -> A 3, B 3, C 1, D 0 (D's first seat is harder to win). + assert gen.highest_averages(V, 7, "sainte-lague")[0] == {"A": 3, "B": 2, "C": 1, "D": 1} + alloc, qs = gen.highest_averages(V, 7, "modified-sainte-lague", 1.4) + assert alloc == {"A": 3, "B": 3, "C": 1, "D": 0}, alloc + assert qs[0] == (Fraction(100000) / Fraction(7, 5), "A") and near(qs[0][0], 71428.571429) + assert qs[6] == (Fraction(16000), "B") + # first divisor 1.2: C's first quotient is 30000 / 1.2 = 25000, D's is 16666.67 + # seven largest: 83333 66667 33333 26667 25000 20000 16667(D) -> A 3, B 2, C 1, D 1 + assert gen.highest_averages(V, 7, "modified-sainte-lague", 1.2)[0] == {"A": 3, "B": 2, "C": 1, "D": 1} + +def test_threshold_then_dhondt(): + # X 5200, Y 3100, Z 1300, W 400: 10000 valid votes. A 5% threshold removes W (4%). + # X: 5200 2600 1733 1300 Y: 3100 1550 1033 Z: 1300 -> five largest 5200 3100 2600 1733 1550 -> X 3, Y 2, Z 0 + votes = {"X": 5200, "Y": 3100, "Z": 1300, "W": 400} + qual = dict((p, v) for p, v in votes.items() if 100.0 * v / 10000 >= 5) + alloc, qs = gen.highest_averages(qual, 5, "dhondt") + assert alloc == {"X": 3, "Y": 2, "Z": 0} + assert qs[4] == (Fraction(1550), "Y") and qs[5][0] == 1300 + assert not gen.clear_quotients(gen.highest_averages(V, 8, "dhondt")[1], 8) # the tie at 20000 is rejected + +# ------------------------------------------------------------ largest remainder +# Standard example (Wikipedia, "Largest remainder method"): 100000 votes, 10 seats. +W = {"Yellows": 47000, "Whites": 16000, "Reds": 15800, "Greens": 12000, "Blues": 6100, "Pinks": 3100} + +def test_hare(): + # Q = 100000 / 10 = 10000. Whole quotas 4 1 1 1 0 0 (7 seats). Remainders 7000 6000 5800 2000 6100 3100. + # Three seats left: Yellows (7000), Blues (6100), Whites (6000) -> 5 2 1 1 1 0 + total, auto, extra, q, margin, left = gen.largest_remainder(W, 10, "hare") + assert q == 10000 and left == 3 + assert auto == {"Yellows": 4, "Whites": 1, "Reds": 1, "Greens": 1, "Blues": 0, "Pinks": 0} + assert sorted(extra) == ["Blues", "Whites", "Yellows"] + assert total == {"Yellows": 5, "Whites": 2, "Reds": 1, "Greens": 1, "Blues": 1, "Pinks": 0} + assert near(margin, (6000 - 5800) / 10000.0) + +def test_droop(): + # Q = floor(100000 / 11) + 1 = 9090 + 1 = 9091. Whole quotas 5 1 1 1 0 0 (8 seats). + # Remainders 47000 - 45455 = 1545, 6909, 6709, 2909, 6100, 3100. Two left: Whites, Reds -> 5 2 2 1 0 0 + total, auto, extra, q, margin, left = gen.largest_remainder(W, 10, "droop") + assert q == 9091 and left == 2 + assert auto["Yellows"] == 5 and sorted(extra) == ["Reds", "Whites"] + assert total == {"Yellows": 5, "Whites": 2, "Reds": 2, "Greens": 1, "Blues": 0, "Pinks": 0} + assert near(margin, (6709 - 6100) / 9091.0) + +def test_small_both_quotas(): + # 420, 310, 170, 100 (1000 votes), 5 seats. + # Hare Q = 200: whole 2 1 0 0, remainders 20 110 170 100, two left -> C, B: 2 2 1 0 + # Droop Q = floor(1000 / 6) + 1 = 167: whole 2 1 1 0, remainders 86 143 3 100, one left -> B: 2 2 1 0 + v = {"A": 420, "B": 310, "C": 170, "D": 100} + total, auto, extra, q, margin, left = gen.largest_remainder(v, 5, "hare") + assert (q, auto, sorted(extra), total) == (200, {"A": 2, "B": 1, "C": 0, "D": 0}, ["B", "C"], {"A": 2, "B": 2, "C": 1, "D": 0}) + assert near(margin, 0.05) + total, auto, extra, q, margin, left = gen.largest_remainder(v, 5, "droop") + assert (q, auto, extra, total) == (167, {"A": 2, "B": 1, "C": 1, "D": 0}, ["B"], {"A": 2, "B": 2, "C": 1, "D": 0}) + # Hare quota need not be whole: 1000 votes, 3 seats -> 333.33 + assert gen.quota(1000, 3, "hare") == Fraction(1000, 3) and gen.quota(1000, 3, "droop") == 251 + +# ------------------------------------------------------------ Gallagher index +def test_gallagher(): + # votes 40 30 20 10 %, seats 5 3 2 0 of 10 = 50 30 20 0 %: squares 100 0 0 100 -> sqrt(0.5 * 200) = 10 + assert near(gen.gallagher({"a": 40, "b": 30, "c": 20, "d": 10}, {"a": 5, "b": 3, "c": 2}), 10.0) + # perfectly proportional -> 0 + assert near(gen.gallagher({"a": 600, "b": 400}, {"a": 3, "b": 2}), 0.0) + # votes 45 35 20 %, seats 5 4 1 of 10 = 50 40 10 %: squares 25 25 100 -> sqrt(75) = 8.660254 + assert near(gen.gallagher({"a": 45, "b": 35, "c": 20}, {"a": 5, "b": 4, "c": 1}), 8.660254) + # votes 60 40 %, seats 7 3: squares 100 100 -> 10 + assert near(gen.gallagher({"a": 6000, "b": 4000}, {"a": 7, "b": 3}), 10.0) + +# ------------------------------------------------------------ levelling seats +NAT = {"P": 5000, "Q": 3000, "R": 2000} + +def test_levelling_plain(): + # 8 fixed (5 2 1) + 2 levelling = 10 seats, Sainte-Lague on 5000 3000 2000: + # P 5000 1667 1000 714 556 | 455 Q 3000 1000 600 | 429 R 2000 667 | 400 -> entitlement 5 3 2 + # nobody is over, so levelling = 0 1 1 + total, used = gen.levelling(NAT, {"P": 5, "Q": 2, "R": 1}, 10, "sainte-lague") + assert total == {"P": 5, "Q": 3, "R": 2} and len(used) == 1 + +def test_levelling_overhang(): + # 10 fixed (7 2 1) + 2 levelling = 12 seats. Entitlement on 12: the next quotients are 455 (P) and 429 (Q) -> 6 4 2. + # P holds 7 > 6: it keeps 7 and is set aside. 12 - 7 = 5 seats for Q and R: + # Q 3000 1000 600 | 429 R 2000 667 | 400 -> 3 and 2. Totals 7 3 2, levelling 0 1 1. + total, used = gen.levelling(NAT, {"P": 7, "Q": 2, "R": 1}, 12, "sainte-lague") + assert total == {"P": 7, "Q": 3, "R": 2} and len(used) == 2 + +def test_levelling_cascade(): + # D'Hondt, 10 fixed (6 4 0) + 1 levelling = 11 seats. + # P 5000 2500 1667 1250 1000 833 | 714 Q 3000 1500 1000 | 750 R 2000 1000 | 667 -> entitlement 6 3 2 + # Q holds 4 > 3: set aside, 7 seats left for P and R: 5000 2500 2000 1667 1250 1000(P) 1000(R) -> 5 and 2 + # now P holds 6 > 5: set aside, 11 - 4 - 6 = 1 seat left for R -> 1. Totals 6 4 1. + total, used = gen.levelling(NAT, {"P": 6, "Q": 4, "R": 0}, 11, "dhondt") + assert total == {"P": 6, "Q": 4, "R": 1} and len(used) == 3 + +def test_generated_tasks(): + for fam in sorted(gen.FAMILIES): + for d in (1, 2, 3): + for seed in range(8): + t = gen.generate(seed, d, fam) + assert 6 <= len(t.checks) <= 40, (t.id, len(t.checks)) + assert "—" not in t.instruction + if fam == "constituencies" and d == 3: # levelling seats add up to the stated number + import json + lev = sum(c["value"] for c in t.checks if c["path"].startswith("levelling_seats.")) + assert lev == json.loads(t.files["election.json"])["levelling_seats"] + +if __name__ == "__main__": + tests = [v for k, v in sorted(globals().items()) if k.startswith("test_")] + for t in tests: t() + print("test_seat_count: %d tests passed" % len(tests)) diff --git a/tests/test_stand_inventory.py b/tests/test_stand_inventory.py new file mode 100644 index 0000000000000000000000000000000000000000..52dd7fe664bba0708d135a73443414bcc74e822e --- /dev/null +++ b/tests/test_stand_inventory.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python3 +"""Hand-worked cases for Stand Inventory. Run: python3 tests/test_stand_inventory.py""" +import math, os, sys +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from envs.stand_inventory import gen as G + +def close(a, b, tol=1e-3): assert abs(a - b) <= tol, (a, b) + +# ---------------------------------------------------------------- plots +# Basal area of a 30 cm tree: pi * 0.15^2 = pi * 0.0225 = 0.070686 m2. +close(G.basal_area_m2(30), 0.070686, 1e-6) +# Radius 10 m: area = 314.159 m2, expansion factor = 10000 / 314.159 = 31.831. +close(G.expansion_factor(10.0), 31.831) +# Case 1: two 20 cm trees on a 10 m plot. g = pi * 0.1^2 = 0.0314159 each, sum 0.0628319. +# stems/ha = 2 * 31.831 = 63.662; BA/ha = 0.0628319 * 31.831 = 2.000; QMD = 20 (all trees equal). +n, stems, ba, q = G.plot_metrics([20, 20], 10.0) +assert n == 2; close(stems, 63.662); close(ba, 2.0); close(q, 20.0) +# Case 2: a 100 m2 plot (radius sqrt(100 / pi) = 5.641896 m), expansion factor 100. Trees 10, 20, 30 cm: +# g = 0.007854 + 0.031416 + 0.070686 = 0.109956 m2 -> 10.9956 m2/ha; 300 stems/ha; +# QMD = sqrt((100 + 400 + 900) / 3) = sqrt(466.667) = 21.602 cm. +n, stems, ba, q = G.plot_metrics([10, 20, 30], 5.641896) +assert n == 3; close(stems, 300.0, 1e-2); close(ba, 10.9956); close(q, 21.602) +# Case 3: radius 7.98 m: area = pi * 63.6804 = 200.058 m2, factor 49.9855. Four 25 cm trees: +# g = pi * 0.125^2 = 0.0490874 each, sum 0.19635 -> 9.8146 m2/ha; 4 * 49.9855 = 199.94 stems/ha; QMD 25. +n, stems, ba, q = G.plot_metrics([25, 25, 25, 25], 7.98) +close(stems, 199.94, 1e-2); close(ba, 9.8146); close(q, 25.0) +# QMD from stand values: 800 stems/ha and 25.1327 m2/ha -> mean tree g = 0.0314159 m2 -> 20 cm. +close(G.qmd_cm(25.1327, 800), 20.0) + +# ---------------------------------------------------------------- volume +# Case 1: v = 0.00005 * 20^2 * 16^1 = 0.00005 * 400 * 16 = 0.32 m3. +close(G.tree_volume(20, 16, 0.00005, 2, 1), 0.32, 1e-9) +# Case 2: v = 0.0001 * 30^2 * 25^0.5 = 0.0001 * 900 * 5 = 0.45 m3. +close(G.tree_volume(30, 25, 0.0001, 2, 0.5), 0.45, 1e-9) +# Case 3 (fractional exponents): 0.0001 * 10^1.9 * 10^1.1 = 0.0001 * 10^3 = 0.1 m3. +close(G.tree_volume(10, 10, 0.0001, 1.9, 1.1), 0.1, 1e-9) +# Height curve: h = 1.3 + 20^2 / (2 + 0.15 * 20)^2 = 1.3 + 400 / 25 = 17.3 m. +close(G.curve_height(20, 2, 0.15), 17.3, 1e-9) +# h = 1.3 + 30^2 / (1.5 + 0.2 * 30)^2 = 1.3 + 900 / 56.25 = 17.3 m. +close(G.curve_height(30, 1.5, 0.2), 17.3, 1e-9) +# h = 1.3 + 10^2 / (3 + 0.2 * 10)^2 = 1.3 + 100 / 25 = 5.3 m. +close(G.curve_height(10, 3, 0.2), 5.3, 1e-9) +# Form-factor rule: g(40 cm) = pi * 0.2^2 = 0.125664; v = 0.125664 * 20 * 0.5 = 1.256637 m3. +close(G.form_factor_volume(40, 20, 0.5), 1.256637, 1e-6) +# Lorey's height: trees (10 cm, 10 m) and (20 cm, 20 m) have basal areas in ratio 1 : 4 -> (10 + 80) / 5 = 18 m. +close(G.lorey_height([(10, 10), (20, 20)]), 18.0, 1e-9) +# Equal diameters give the plain mean: (12 + 18) / 2 = 15 m. +close(G.lorey_height([(25, 12), (25, 18)]), 15.0, 1e-9) + +# ---------------------------------------------------------------- thinning +# Case 1: trees 10, 20, 30, 40 cm on 1000 m2 (factor 10). +# g = 0.007854, 0.031416, 0.070686, 0.125664; total 0.235619 -> 2.35619 m2/ha. +# Target 2.0: remove the 10 cm tree -> 2.27765 (> 2.0), remove the 20 cm tree -> 1.96350 (<= 2.0): stop. +assert G.thin_from_below([(1, 10, True, False), (2, 20, True, False), (3, 30, True, False), (4, 40, True, False)], 1000, 2.0) == [1, 2] +# Case 2 (tie-break): three 20 cm trees numbered 7, 3, 5 and a 30 cm tree on 1 ha (factor 1). +# total = 3 * 0.031416 + 0.070686 = 0.164934. Target 0.11: remove tree 3 -> 0.133518, tree 5 -> 0.102102: stop. Tree 7 stays. +assert G.thin_from_below([(7, 20, True, False), (3, 20, True, False), (5, 20, True, False), (9, 30, True, False)], 10000, 0.11) == [3, 5] +# Case 3 (retention and damage) on 1 ha: tree 1 (10 cm) retained, tree 3 (40 cm) damaged. +# g: 10 -> 0.007854, 12 -> 0.011310, 40 -> 0.125664, 30 -> 0.070686, 35 -> 0.096211; total 0.311725. +# Damaged tree 3 goes first -> 0.186061 (> 0.17). Tree 1 is retained. Tree 2 -> 0.174751 (> 0.17). Tree 4 -> 0.104065: stop. +assert G.thin_from_below([(1, 10, False, False), (2, 12, True, False), (3, 40, True, True), (4, 30, True, False), (5, 35, True, False)], 10000, 0.17) == [3, 2, 4] +# Case 4: already at the target (0.311725 <= 1.0), nothing is removed. +assert G.thin_from_below([(1, 10, True, False), (2, 12, True, False), (3, 40, True, False), (4, 30, True, False), (5, 35, True, False)], 10000, 1.0) == [] +# Case 5 (tie-break again): two 20 cm trees on 1 ha, total 0.062832; target 0.04 -> one removal (0.031416). +assert G.thin_from_below([(2, 20, True, False), (1, 20, True, False)], 10000, 0.04) == [1] +# Quadratic mean of 10, 20, 30 = sqrt(1400 / 3) = 21.602; of 3, 4 = sqrt(12.5) = 3.5355. +close(G.quadratic_mean([10, 20, 30]), 21.602); close(G.quadratic_mean([3, 4]), 3.5355) + +# ---------------------------------------------------------------- growth +# Case 1: 200 -> 260 m3/ha in 10 years, nothing cut: PAI = 60 / 10 = 6.0; age 65: MAI = 260 / 65 = 4.0. +close(G.periodic_annual_increment(200, 260, 0, 10), 6.0, 1e-9); close(G.mean_annual_increment(260, 0, 65), 4.0, 1e-9) +# Case 2: same volumes with 30 m3/ha thinned in the period: PAI = (60 + 30) / 10 = 9.0. +# 40 m3/ha removed in the stand's life, age 60: MAI = (260 + 40) / 60 = 5.0. +close(G.periodic_annual_increment(200, 260, 30, 10), 9.0, 1e-9); close(G.mean_annual_increment(260, 40, 60), 5.0, 1e-9) +# Case 3: standing volume fell from 300 to 280 over 5 years but 45 was cut: PAI = (-20 + 45) / 5 = 5.0. +close(G.periodic_annual_increment(300, 280, 45, 5), 5.0, 1e-9) +# Pressler: 200 -> 300 in 10 years: p = 200 / 10 * 100 / 500 = 4.0 % per year. +close(G.pressler_percent(200, 300, 10), 4.0, 1e-9) +# Pressler: 150 -> 170 in 5 years: p = 200 / 5 * 20 / 320 = 2.5 %. +close(G.pressler_percent(150, 170, 5), 2.5, 1e-9) +# Years to target: 100 at 10 % to 121 = 100 * 1.1^2 -> exactly 2 years. +close(G.years_to_target(100, 10.0, 121), 2.0, 1e-9) +# 300 at 4 % to 400: ln(1.33333) / ln(1.04) = 0.287682 / 0.0392207 = 7.335 -> 8 whole years (1.04^7 = 1.3159 < 1.3333 < 1.04^8 = 1.3686). +t = G.years_to_target(300, 4.0, 400) +close(t, 7.335); assert math.ceil(t) == 8 and 300 * 1.04 ** 7 < 400 <= 300 * 1.04 ** 8 + +# ---------------------------------------------------------------- generator sanity +for d in (1, 2, 3): + for fam in G.FAMILIES: + t = G.generate(3, d, fam) + assert t.family == fam and 6 <= len(t.checks) <= 45, (fam, d, len(t.checks)) +print("test_stand_inventory: all passed") diff --git a/tests/test_ward_round.py b/tests/test_ward_round.py new file mode 100644 index 0000000000000000000000000000000000000000..9a5d6911a0e28161826b204c4d05490db095adbe --- /dev/null +++ b/tests/test_ward_round.py @@ -0,0 +1,40 @@ +"""Hand-worked cases for Ward Round. Run: python3 tests/test_ward_round.py""" +import os, sys +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from envs.ward_round import gen +from practice.core import half_up + +def o(rr, spo2, scale, o2, bp, pulse, c, t): + return {"resp_rate": rr, "spo2": spo2, "spo2_scale": scale, "on_oxygen": o2, "systolic_bp": bp, "pulse": pulse, "consciousness": c, "temperature": t} + +# NEWS2, scored by hand from the published chart +assert gen.news2(o(16, 98, 1, "no", 120, 70, "A", 37.0)) == (0, "low") # every parameter in its 0 band +assert gen.news2(o(25, 91, 1, "yes", 90, 131, "V", 35.0)) == (20, "high") # 3+3+2+3+3+3+3 +assert gen.news2(o(8, 98, 1, "no", 120, 70, "A", 37.0)) == (3, "low-medium") # one red score, total under 5 +assert gen.news2(o(22, 95, 1, "no", 105, 95, "A", 38.5)) == (6, "medium") # 2+1+0+1+1+0+1 +assert gen.news2(o(21, 94, 1, "no", 111, 91, "A", 38.1)) == (5, "medium") # 2+1+0+0+1+0+1 +assert gen.news2(o(16, 93, 2, "yes", 120, 70, "A", 37.0)) == (3, "low") # scale 2: 93 on oxygen = 1, plus oxygen 2 +assert gen.news2(o(16, 97, 2, "yes", 120, 70, "A", 37.0)) == (5, "medium") # scale 2: 97 on oxygen = 3, plus oxygen 2 +assert gen.news2(o(16, 95, 2, "no", 120, 70, "A", 37.0)) == (0, "low") # scale 2: 93 or more on air = 0 +assert gen.news2(o(16, 86, 2, "no", 120, 70, "A", 37.0)) == (1, "low") # scale 2: 86 to 87 = 1 +assert gen.news2(o(12, 96, 1, "no", 220, 50, "A", 39.1)) == (6, "medium") # 0+0+0+3+1+0+2 +# band edges +assert [gen.s_rr(v) for v in (8, 9, 11, 12, 20, 21, 24, 25)] == [3, 1, 1, 0, 0, 2, 2, 3] +assert [gen.s_bp(v) for v in (90, 91, 100, 101, 110, 111, 219, 220)] == [3, 2, 2, 1, 1, 0, 0, 3] +assert [gen.s_pulse(v) for v in (40, 41, 50, 51, 90, 91, 110, 111, 130, 131)] == [3, 1, 1, 0, 0, 1, 1, 2, 2, 3] +assert [gen.s_temp(v) for v in (35.0, 35.1, 36.0, 36.1, 38.0, 38.1, 39.0, 39.1)] == [3, 1, 1, 0, 0, 1, 1, 2] + +# dosing +assert gen.dose_mg(15, 20, 1000) == 300 # 15 mg/kg x 20 kg; 300 mg / 10 mg per ml = 30 ml +assert gen.dose_mg(15, 80, 1000) == 1000 # 1200 mg is capped at the maximum single dose +assert abs(gen.dose_mg(0.1, 62.5, 10) - 6.25) < 1e-9 +assert gen.pump_rate(100, 30) == 200.0 # 100 ml in half an hour +assert abs(gen.pump_rate(1000, 480) - 125.0) < 1e-9 +assert abs(gen.drip_rate(1000, 20, 480) - 41.6667) < 1e-3 and half_up(gen.drip_rate(1000, 20, 480)) == 42 +assert half_up(gen.drip_rate(500, 15, 240)) == 31 # 31.25 drops/min +assert half_up(2.5) == 3 and half_up(3.5) == 4 # half up, not banker's rounding + +# fluid balance: 840 ml urine, 70 kg, 24 h = 0.5 ml/kg/h exactly; below that is oliguria +assert abs(gen.urine_rate(840, 70) - 0.5) < 1e-12 +assert gen.urine_rate(600, 70) < 0.5 < gen.urine_rate(1200, 70) +print("ward_round: all hand-worked cases pass") diff --git a/tests/test_zoning_check.py b/tests/test_zoning_check.py new file mode 100644 index 0000000000000000000000000000000000000000..388d8a74b37a0619af833ee57ffb8af59c152e6a --- /dev/null +++ b/tests/test_zoning_check.py @@ -0,0 +1,25 @@ +"""Hand-worked checks for the fictional code; no external zoning rules apply.""" +import sys +from pathlib import Path +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +from envs.zoning_check.gen import polygon_area,capacity,parking,compliance +# Rectangles 10*20, translated triangle base 6 height 4 / 2, L shape 100-36. +assert polygon_area([(0,0),(10,0),(10,20),(0,20)])==200 +assert polygon_area([(3,2),(9,2),(3,6)])==12 +assert polygon_area([(0,0),(10,0),(10,4),(4,4),(4,10),(0,10)])==64 +# Reversing orientation cannot change area. +assert polygon_area([(0,10),(4,10),(4,4),(10,4),(10,0),(0,0)])==64 +# 50*50: 1 floor binds coverage at 1000; 4 floors bind FAR at 3000. +assert capacity(50,50,1)[:2]==(1000,'coverage') +assert capacity(50,50,4)[:2]==(3000,'far') +# Narrow plot: setback envelope 2*42*2=168. +assert capacity(10,50,2)[:2]==(168,'setbacks') +# Ceiling once: 1.5+1+1=3.5 -> 4; 3+1+1=5; 4.5+.5+.5=5.5 -> 6. +assert parking(1,40,60)==4 +assert parking(2,40,60)==5 +assert parking(3,20,30)==6 +row=dict(width_m=20,depth_m=20,gross_floor_m2=480,footprint_m2=160,height_m=15,front_m=4,rear_m=4,left_m=4,right_m=4) +assert compliance(row)==(400,1.2,.4,[]) +assert compliance(dict(row,gross_floor_m2=500,front_m=3))[3]==['far','setback'] +assert compliance(dict(row,footprint_m2=200,height_m=18))[3]==['coverage','height'] +print('zoning_check: 3 hand-worked cases per family passed') diff --git a/tools/check_tasks.py b/tools/check_tasks.py new file mode 100644 index 0000000000000000000000000000000000000000..0346860cf41d2c196bd24ec9bc3118251e9b76fe --- /dev/null +++ b/tools/check_tasks.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +"""Run the exported task directories the way a harness would. + + python3 tools/check_tasks.py # every task, without Docker: oracle must score 1, no-op must score 0 + python3 tools/check_tasks.py --docker 2 # also build and run N tasks per environment in Docker with no network + +The local mode copies environment/workdir to a temp folder, runs tests/verify.py for the no-op case, +then solution/oracle.py and tests/verify.py again. It uses only the files in the task directory. +""" +import json, os, shutil, subprocess, sys, tempfile +ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + +def tasks(): + with open(os.path.join(ROOT, "tasks.jsonl")) as f: + return [json.loads(l) for l in f] + +def reward(out): + try: return float(open(os.path.join(out, "reward.txt")).read()) + except Exception: return None + +def local(t): + td = os.path.join(ROOT, t["path"]) + with tempfile.TemporaryDirectory() as tmp: + app, out = os.path.join(tmp, "app"), os.path.join(tmp, "out") + shutil.copytree(os.path.join(td, "environment", "workdir"), app) + v = [sys.executable, "-I", os.path.join(td, "tests", "verify.py"), "--answer", os.path.join(app, "answer.json"), "--out", out] + subprocess.run(v, capture_output=True, timeout=120); r0 = reward(out) + subprocess.run([sys.executable, "-I", os.path.join(td, "solution", "oracle.py")], cwd=app, capture_output=True, timeout=120) + subprocess.run(v, capture_output=True, timeout=120); r1 = reward(out) + return r0, r1 + +def docker(t): + td = os.path.join(ROOT, t["path"]); tag = "practice-check:" + t["id"].lower() + b = subprocess.run(["docker", "build", "-q", "-t", tag, os.path.join(td, "environment")], capture_output=True, text=True, timeout=900) + if b.returncode: return None, None, b.stderr[-300:] + def run(cmd): + r = subprocess.run(["docker", "run", "--rm", "--network", "none", "--memory", "1g", "--cpus", "1", + "-v", os.path.join(td, "tests") + ":/tests:ro", "-v", os.path.join(td, "solution") + ":/solution:ro", tag, "bash", "-c", cmd], + capture_output=True, text=True, timeout=300) + try: return float(r.stdout.strip().splitlines()[-1]) + except Exception: return None + r0 = run("bash /tests/test.sh >/dev/null 2>&1; cat /logs/verifier/reward.txt") + r1 = run("bash /solution/solve.sh >/dev/null 2>&1; bash /tests/test.sh >/dev/null 2>&1; cat /logs/verifier/reward.txt") + subprocess.run(["docker", "rmi", "-f", tag], capture_output=True) + return r0, r1, "" + +if __name__ == "__main__": + ts = tasks(); bad = 0 + if "--docker" in sys.argv: + n = int(sys.argv[sys.argv.index("--docker") + 1]); seen = {} + for t in ts: + k = (t["env"], t["family"]) + if seen.get(t["env"], 0) >= n or k in seen: continue + seen[t["env"]] = seen.get(t["env"], 0) + 1; seen[k] = 1 + r0, r1, err = docker(t) + ok = r0 == 0.0 and r1 == 1.0; bad += not ok + print("%s docker no-op=%s oracle=%s %s %s" % ("ok " if ok else "FAIL", r0, r1, t["id"], err)) + else: + for t in ts: + r0, r1 = local(t) + if not (r0 == 0.0 and r1 == 1.0): bad += 1; print("FAIL no-op=%s oracle=%s %s" % (r0, r1, t["id"])) + print("%d tasks checked, %d failures" % (len(ts), bad)) + sys.exit(1 if bad else 0) diff --git a/tools/export.py b/tools/export.py new file mode 100644 index 0000000000000000000000000000000000000000..1208f595e3a7eb324f01aa46e8e25e8d8a59b94f --- /dev/null +++ b/tools/export.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python3 +"""Export every environment as Harbor task directories under tasks///. + + python3 tools/export.py # all environments + python3 tools/export.py ward_round # one + +Each task directory is self-contained: + instruction.md what the agent is asked to do + task.toml metadata, limits + environment/Dockerfile python:3.12-slim with the task files in /app; no network needed + environment/workdir/... the task files + solution/solve.sh, oracle.py reference solution (never shown to the agent) + tests/test.sh, verify.py, checks.json[, validators.py] hidden verifier; writes /logs/verifier/reward.txt +""" +import importlib, json, os, shutil, sys +ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +sys.path.insert(0, ROOT) +TRAIN, EVAL, EVAL_BASE = 84, 24, 10000 + +def read_toml(path): + """Tiny reader for the flat env.toml files (strings and string lists only).""" + out = {} + for line in open(path): + line = line.strip() + if not line or line.startswith("#") or "=" not in line: continue + k, v = line.split("=", 1) + out[k.strip()] = json.loads(v.strip()) + return out + +def env_dirs(): + return sorted(d for d in os.listdir(os.path.join(ROOT, "envs")) if os.path.exists(os.path.join(ROOT, "envs", d, "env.toml"))) + +def plan(families): + f = len(families) + for split, n, base in (("train", TRAIN, 0), ("eval", EVAL, EVAL_BASE)): + for i in range(n): + yield split, base + i, sorted(families)[i % f], 1 + (i // f) % 3 + +DOCKERFILE = "FROM python:3.12-slim\nWORKDIR /app\nCOPY workdir/ /app/\n" +SOLVE = "#!/bin/bash\nset -e\ncd /app\npython3 /solution/oracle.py\n" +TEST = "#!/bin/bash\nmkdir -p /logs/verifier\npython3 /tests/verify.py --answer /app/answer.json --checks /tests/checks.json --out /logs/verifier || echo 0 > /logs/verifier/reward.txt\n" + +def write(path, text, mode=None): + os.makedirs(os.path.dirname(path), exist_ok=True) + with open(path, "w") as f: f.write(text) + if mode: os.chmod(path, mode) + +def export_env(d, manifest): + meta = read_toml(os.path.join(ROOT, "envs", d, "env.toml")) + gen = importlib.import_module("envs.%s.gen" % d) + out = os.path.join(ROOT, "tasks", meta["name"]) + shutil.rmtree(out, ignore_errors=True) + verify_src = open(os.path.join(ROOT, "practice", "verify.py")).read() + oracle_src = open(os.path.join(ROOT, "envs", d, "oracle.py")).read() + vpath = os.path.join(ROOT, "envs", d, "validators.py") + validators_src = open(vpath).read() if os.path.exists(vpath) else None + n = 0 + for split, seed, family, difficulty in plan(meta["families"]): + t = gen.generate(seed, difficulty, family) + tid = "%s-%s-d%d-%s%04d" % (meta["name"], family, difficulty, "e" if split == "eval" else "t", seed % EVAL_BASE) + td = os.path.join(out, tid) + write(os.path.join(td, "instruction.md"), t.instruction.strip() + "\n") + write(os.path.join(td, "task.toml"), "\n".join([ + 'version = "1.0"', "", "[metadata]", 'author_name = "Renaissance Labs"', 'author_email = "unknown"', + 'difficulty = "%s"' % {1: "easy", 2: "medium", 3: "hard"}[difficulty], 'category = "%s"' % meta["name"], + "tags = %s" % json.dumps([meta["name"], family, "isced-" + meta["isced"], split]), + 'isced_f = "%s"' % meta["isced"], 'family = "%s"' % family, 'split = "%s"' % split, "seed = %d" % seed, "", + "[verifier]", "timeout_sec = 120.0", "", "[agent]", "timeout_sec = 900.0", "", + "[environment]", "build_timeout_sec = 600.0", "cpus = 1", "memory_mb = 1024", "storage_mb = 2048", "allow_internet = false", ""])) + write(os.path.join(td, "environment", "Dockerfile"), DOCKERFILE) + for rel, text in t.files.items(): write(os.path.join(td, "environment", "workdir", rel), text) + write(os.path.join(td, "solution", "solve.sh"), SOLVE, 0o755) + write(os.path.join(td, "solution", "oracle.py"), oracle_src) + write(os.path.join(td, "tests", "test.sh"), TEST, 0o755) + write(os.path.join(td, "tests", "verify.py"), verify_src) + write(os.path.join(td, "tests", "checks.json"), json.dumps(t.checks, indent=1) + "\n") + if validators_src: write(os.path.join(td, "tests", "validators.py"), validators_src) + manifest.append({"id": tid, "env": meta["name"], "isced_f": meta["isced"], "family": family, "difficulty": difficulty, "split": split, + "seed": seed, "path": "tasks/%s/%s" % (meta["name"], tid), "title": t.title, "checks": len(t.checks), "instruction": t.instruction.strip()}) + n += 1 + return meta, n + +if __name__ == "__main__": + only = sys.argv[1:] + manifest, envs = [], [] + for d in env_dirs(): + if only and d not in only: continue + meta, n = export_env(d, manifest); meta["tasks"] = n; meta["folder"] = d; envs.append(meta) + print("%-22s %4d tasks" % (meta["name"], n)) + if only: + # A partial rebuild must update the release indices as well as the folders. + rebuilt = {e["name"] for e in envs} + task_index = os.path.join(ROOT, "tasks.jsonl") + env_index = os.path.join(ROOT, "environments.json") + if os.path.exists(task_index): + with open(task_index) as f: + manifest += [m for m in map(json.loads, f) if m["env"] not in rebuilt] + if os.path.exists(env_index): + with open(env_index) as f: + envs += [e for e in json.load(f) if e["name"] not in rebuilt] + manifest.sort(key=lambda m: (m["env"], m["split"] != "train", m["seed"])) + envs.sort(key=lambda e: e["name"]) + with open(os.path.join(ROOT, "tasks.jsonl"), "w") as f: + for m in manifest: f.write(json.dumps(m, ensure_ascii=False) + "\n") + with open(os.path.join(ROOT, "environments.json"), "w") as f: + json.dump(envs, f, indent=1, ensure_ascii=False) + print(len(manifest), "tasks") diff --git a/tools/make_card.py b/tools/make_card.py new file mode 100644 index 0000000000000000000000000000000000000000..c21de8409be7cbd38b757437ae2dda10a301ab53 --- /dev/null +++ b/tools/make_card.py @@ -0,0 +1,102 @@ +#!/usr/bin/env python3 +"""Write the dataset card (README.md) and the per-environment index files (data//.jsonl) +from environments.json and tasks.jsonl. Run after tools/export.py.""" +import json, os, shutil +ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +ISCED = {"0111": "Education science", "0222": "History and archaeology", "0223": "Philosophy and ethics", "0311": "Economics", + "0312": "Political sciences and civics", "0313": "Psychology", "0314": "Sociology and cultural studies", "0521": "Environmental sciences", + "0721": "Food processing", "0731": "Architecture and town planning", "0821": "Forestry", "0913": "Nursing and midwifery", + "0923": "Social work and counselling", "1022": "Occupational health and safety"} +envs = sorted(json.load(open(os.path.join(ROOT, "environments.json"))), key=lambda e: e["isced"]) +tasks = [json.loads(l) for l in open(os.path.join(ROOT, "tasks.jsonl"))] +shutil.rmtree(os.path.join(ROOT, "data"), ignore_errors=True) +for e in envs: + for split in ("train", "eval"): + p = os.path.join(ROOT, "data", e["name"], split + ".jsonl"); os.makedirs(os.path.dirname(p), exist_ok=True) + with open(p, "w") as f: + for t in tasks: + if t["env"] == e["name"] and t["split"] == split: + f.write(json.dumps({k: t[k] for k in ("id", "env", "isced_f", "family", "difficulty", "seed", "title", "instruction", "checks", "path")}, ensure_ascii=False) + "\n") +yaml = ["---", "pretty_name: Practice", "license: mit", "language:", "- en", "task_categories:", "- other", "tags:", "- rl-environment", "- harbor", "- agents", + "- reinforcement-learning", "- verifiable-rewards", "- isced-f", "size_categories:", "- 1K