If we do it: a cd_summary() table over several stations that share one long_name says which row is which station. If we never do: two rows read Mean discharge / Annual with different slopes and nothing to tell them apart — while cd_plot_comparison() beside the table labels the same series Mean discharge (q_site1).
Problem
series_check() tells callers that series from several sites need distinct variable names. The natural next step for streamflow is one long_name ("Mean discharge") on every station. cd_summary() (R/cd_summary.R) replaces variable with Parameter = long_name and drops variable, so those rows become indistinguishable. Measured in #93's review with q_site1 / q_site2.
#93 handled the same case in cd_plot_comparison(): a label shared by several variables gets (variable) appended, and facets key on variable + label so nothing can merge.
Proposed Solution
- In
cd_summary(), append (variable) to a Parameter shared by more than one variable — the same rule as cd_plot_comparison(), ideally lifted into one internal helper both call.
- Test: two stations, one
long_name → two distinct Parameter values; registered ERA5 variables unchanged (registry long_names are unique).
A second way to get indistinguishable rows: since #97 a trend table can hold both a raw-value and an anomaly trend of one series (bind_rows(cd_trend(x), cd_trend(ano)), told apart by trend_on). cd_summary() drops trend_on, so those rows differ only by Unit, and for an absolute variable such as tmean not even by that. Whatever disambiguates stations here should also cover trend_on, or cd_summary() should carry it.
Decided (plan gate, 2026-09-29): cd_summary() carries it: a Trend on column (Value/Anomaly) after Period, added only when the table holds both scales, so single-scale output keeps its shape. Chosen over always adding the column and over suffixing Parameter. The station rule landed as the shared helper label_disambiguate() (#108). A third look-alike source, several trend_start values, is #106.
Found by /code-check on #93; the trend_on case by the plan review for #97.
If we do it: a
cd_summary()table over several stations that share onelong_namesays which row is which station. If we never do: two rows readMean discharge / Annualwith different slopes and nothing to tell them apart — whilecd_plot_comparison()beside the table labels the same seriesMean discharge (q_site1).Problem
series_check()tells callers that series from several sites need distinctvariablenames. The natural next step for streamflow is onelong_name("Mean discharge") on every station.cd_summary()(R/cd_summary.R) replacesvariablewithParameter = long_nameand dropsvariable, so those rows become indistinguishable. Measured in #93's review withq_site1/q_site2.#93 handled the same case in
cd_plot_comparison(): a label shared by several variables gets(variable)appended, and facets key on variable + label so nothing can merge.Proposed Solution
cd_summary(), append(variable)to aParametershared by more than one variable — the same rule ascd_plot_comparison(), ideally lifted into one internal helper both call.long_name→ two distinctParametervalues; registered ERA5 variables unchanged (registry long_names are unique).A second way to get indistinguishable rows: since #97 a trend table can hold both a raw-value and an anomaly trend of one series (
bind_rows(cd_trend(x), cd_trend(ano)), told apart bytrend_on).cd_summary()dropstrend_on, so those rows differ only byUnit, and for anabsolutevariable such as tmean not even by that. Whatever disambiguates stations here should also covertrend_on, orcd_summary()should carry it.Decided (plan gate, 2026-09-29):
cd_summary()carries it: aTrend oncolumn (Value/Anomaly) afterPeriod, added only when the table holds both scales, so single-scale output keeps its shape. Chosen over always adding the column and over suffixingParameter. The station rule landed as the shared helperlabel_disambiguate()(#108). A third look-alike source, severaltrend_startvalues, is #106.Found by
/code-checkon #93; thetrend_oncase by the plan review for #97.