FEEMU

Fix SN mesh sizes recorded in inches

For netting methods, the mesh size (field effort_width) can be recorded in inches (e.g. 4) instead of mm (i.e. 100). This check replaces all effort_width less than or equal to ten with the value time 25 (e.g. 4 becomes 100)

-- © Copyright 2026 The Kahawai Collective
-- SPDX-License-Identifier: MIT
INSERT INTO grooming_rules
VALUES ('FEEMU', 'edw', 'effort', 'Fix', 'Fix SN mesh sizes recorded in inches');

CREATE OR REPLACE FUNCTION FEEMU() RETURNS VOID AS $$
-- in the slice there is effort at 0.347 this figure appears not to be related
-- to a standard mesurement unit. Therefore have added a 0-10 threshold on the * 25 correction

INSERT INTO groomed.checks (code, "table", "column", id, orig, new)
SELECT 'FEEMU', 'effort', 'effort_width', id, effort_width, effort_width * 25
FROM   groomed.effort
WHERE  primary_method IN ('SN') AND effort_width <= 10 AND effort_width > 0;

UPDATE groomed.effort SET checks = checks || '{FEEMU}', effort_width = u.new::NUMERIC
FROM   groomed.checks u
WHERE  u.code = 'FEEMU'
AND    groomed.effort.id = u.id;

$$ LANGUAGE SQL;
SELECT FEEMU();
Effects of grooming
Figure 1: The number of records affected by the FEEMU rule, by year and source.
Figure 2: The proportion of records affected by the FEEMU rule, by form type, for all form types where some records are groomed by the FEEMU rule.