eduaguilera / eduaguilera/whep
items_full: three items carry a "0" placeholder Name_biomass and are silently dropped from feed availability
- Dominant language
- R
- Stars
- 1
- Forks
- 5
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 186
Description
## What
Three rows of `inst/extdata/harmonization/items_full.csv` carry the literal
string `"0"` in `Name_biomass`, which is a placeholder rather than a real
biomass name:
| `item_cbs_code` | `item_cbs` |
|-----------------|----------------|
| 2775 | Aquatic Plants |
| 4000 | Animal draught |
| 2899 | Miscellaneous |
`biomass_coefs` has no row whose `Name_biomass` is `"0"`, so any join on that
column misses, `avail_dm_t` comes out `NA`, and the row is dropped.
This is distinct from the 21 livestock rows (Cattle, Sheep, Pigs, ...) whose
`Name_biomass` is legitimately **empty** — those are animals, not crop biomass,
and are not affected.
## Measured consequence
Quantified while fixing #220 (2018 CBS via `get_wide_cbs()`): **62 rows /
173,016 t** of fresh-matter feed mass were dropped, and every one of them was
item 2775 "Aquatic Plants". That is ~0.001% of the ~12.0 bn t in scope for the
year, so it is small — but it was silent, and #220's warning only makes it
visible, it does not recover the mass.
## Why this is `needs-expert`
Deciding what to do is a science-data decision, not a mechanical one:
- Supply real dry-matter / residue coefficients for aquatic plants, and if so,
from which source.
- Or decide these three items legitimately have no biomass coefficient and
should be excluded explicitly, so the exclusion is a stated modelling choice
rather than an accidental `NA` drop.
- "Animal draught" and "Miscellaneous" may each want a different answer from
"Aquatic Plants".
Whatever is chosen, the `"0"` placeholder should be replaced by something
unambiguous, since it currently reads as a value.
## Context
Found while fixing #220 (PR #966), which adds the warning that surfaces these
drops. That PR is deliberately mechanical and warning-only; this issue is the
data gap behind it.
Contributor guide
Assessment
This issue has not been assessed yet.