Repository navigation
feat(awards): group the award list by funder, and lead with the funder - #541
Merged
Merged
Conversation
The award table now reads Funder, Award, DOIs. The funder is what someone scans for, and it was in the second column. Adds a grouped view at /awards?group=funder: one row per funder with its award count and the number of distinct DOIs those awards produced, 667 rows against 3,840. The funder links through to /awards?funder=<id>, which already existed, so the grouped view is a way in rather than a new report. The view switch follows the house pattern - a bold label and the other view as a link - rather than a pair of Bootstrap buttons. The view you are on is plain text: a primary button linking to the page it is already on reads as an action and does nothing. It is only offered on the unfiltered page, since narrowed to one funder, grouping by funder is a table of one row. Grouping resolves a funder three ways, in order: By ID, where the deposit carried one. By exact name, where it did not: an entry named "Medical Research Council" with no identifier is not a second council, and it used to sit beside the real one as its own row. Exact string equality only, never similarity - that is what keeps "Wellcome" (100004440) out of "Wellcome Trust" (100010269), which are different registry entries. This folds 67 award rows into the funder they belong to. Not at all, for the eight registry names that belong to two funders apiece. "Human Frontier Science Program" is both 100004412 and 501100000854 and nothing in a deposit says which was meant, so those stay unresolved rather than being assigned to whichever came back first. An identified group is labelled with the registry's own name rather than whichever spelling a deposit used. Two deposits can both type "Wellcome Trust" while carrying different IDs, which rendered as two identical rows with no way to tell them apart; the registry calls those Wellcome Trust and Wellcome. Where a registry name genuinely is shared, the row carries its ID. 245 groups still have no identifier - "NIH" among them, ninth with 104 awards across 45 DOIs. That is a real gap in the harvested data, and the page shows it rather than papering over it in the presentation layer. Resolving it belongs in the funder lookup, where it would also correct the /funders totals and funder membership. Each view downloads its own file, and both carry the funder ID as a column. The table conveys it by linking the funder name; a file cannot, and without it an unidentified row reads the same as a resolved one - "NIH 104 45" beside "National Institutes of Health 804 458" - so anything summing the file would count that funder twice. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The award table now reads Funder, Award, DOIs. The funder is what someone scans for, and it was in the second column.
Adds a grouped view at /awards?group=funder: one row per funder with its award count and the number of distinct DOIs those awards produced, 667 rows against 3,840. The funder links through to /awards?funder=, which already existed, so the grouped view is a way in rather than a new report.
The view switch follows the house pattern - a bold label and the other view as a link - rather than a pair of Bootstrap buttons. The view you are on is plain text: a primary button linking to the page it is already on reads as an action and does nothing. It is only offered on the unfiltered page, since narrowed to one funder, grouping by funder is a table of one row.
Grouping resolves a funder three ways, in order:
By ID, where the deposit carried one.
By exact name, where it did not: an entry named "Medical Research Council" with no identifier is not a second council, and it used to sit beside the real one as its own row. Exact string equality only, never similarity - that is what keeps "Wellcome" (100004440) out of "Wellcome Trust" (100010269), which are different registry entries. This folds 67 award rows into the funder they belong to.
Not at all, for the eight registry names that belong to two funders apiece. "Human Frontier Science Program" is both 100004412 and 501100000854 and nothing in a deposit says which was meant, so those stay unresolved rather than being assigned to whichever came back first.
An identified group is labelled with the registry's own name rather than whichever spelling a deposit used. Two deposits can both type "Wellcome Trust" while carrying different IDs, which rendered as two identical rows with no way to tell them apart; the registry calls those Wellcome Trust and Wellcome. Where a registry name genuinely is shared, the row carries its ID.
245 groups still have no identifier - "NIH" among them, ninth with 104 awards across 45 DOIs. That is a real gap in the harvested data, and the page shows it rather than papering over it in the presentation layer. Resolving it belongs in the funder lookup, where it would also correct the /funders totals and funder membership.
Each view downloads its own file, and both carry the funder ID as a column. The table conveys it by linking the funder name; a file cannot, and without it an unidentified row reads the same as a resolved one - "NIH 104 45" beside "National Institutes of Health 804 458" - so anything summing the file would count that funder twice.
@stuarteberg