Repository navigation
Conversation
A converted constant-price unit may carry deflation_basis (donor, recipient or national). Studio reads it on plain and composed units and shows it in the stat caption, table and chart unit text, and More Info.
This branch has not been deployed
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.
Studio names whose prices deflated a constant-price amount, so a DAC and an IDS amount in one currency and base year read as different measures. A unit without
deflation_basisrenders as before, so this merges safely before or after the dfo-apis change that adds the member.Part of DevelopmentFinanceObservatory/apis#43
Changes
studio/payload.tsandstudio/description.ts: a structured unit carries an optionaldeflation_basis(donor,recipientornational), read on plain units and on each side of a composed unit.studio/statFace.ts: the stat caption reads "constant 2024 prices, donor prices", the wording dfo-apis' analysis engine uses.studio/widgets.ts: table rows and the chart unit read "NGN (constant 2024, donor prices)".studio/descriptionBlocks.ts: the More Info unit row names the basis, and a donor-price amount over a recipient-price amount in one currency reads as two units, where it read as a ratio.Notes for reviewers
The Search unit picker and token notes read
UnitConversionfrom the vendored client (vendor/developmentfinance-client-0.1.0.tgz, built from spec-kit 4ad7739), which has nodeflation_basis. They show the basis once the client is rebuilt from the spec-kit release that recaptures dfo-apis' served contract. Axis titles and chips show no price basis today, so they show no deflation basis either.Testing:
pnpm typecheck, eslint on the touched files, andnode --testover src/lib/studio and src/lib/search (1,740 passed).