Repository navigation
Round model outputs to 4 decimal places - #12
Closed
david-mears-2 wants to merge 119 commits into
Closed
david-mears-2 wants to merge 119 commits into
david-mears-2 wants to merge 119 commits into
Conversation
david-mears-2
commented
Sep 18, 2026
Contributor
- Add script to generate example model output parquet files
- Add metadata for model outputs
- Rename column variant_string to variant to match survey data parquet
- wip wip wip wip
- Make versions soft-coded in metadata endpoint
- Make prevalences parquets include all ancestor region ids, not just region id of most granular level
- Implement prevalences endpoint
- Update example model outputs generator to (1) go back to 1970 more often and (2) not run out of memory when running
- Add instrumentation for timing requests
- Fix survey data requests scoped by admin0
- Response optimizations: columnar format and round high-precision floats
- Rows for survey data, columns for prevalences
- Fix keys/names of rounded columns
- Extract grout region metadata fetch into a startup script
- Extract some consts/types
- Extract some validators
- Extract DuckDB connection
- Extract querying logic
- Refactor querying logic
- Move error handler call to correct place
- Finish implementing query param validators and refactor them
- Tidy comments; extract todos into youtrack tickets
- Reword variable names
- Make node types package match canonical node version
- Apply tsconfig to scripts ts files too
- Tests - iteration 0
- Tests - iteration 1 (refactor fixture generation)
- Remove fixture validation
- Rename GHA workflow
- Small refactors
- Start to type column names; simplify validator test mock
- Alphabetise column types and add unrequestable columns
- Give up having a subset of columns be requestable
- Lots of rewriting tests; remove admin0 format validation
- Make exmaple model outputs generation script a bit more clear
- Remove request timing logger
- Update README.md
- Fix lint command
- Remove tests
- Refactor: make validation-wrapper funcs for two endpoints
- fix f74509c
- Remove some gubbins
- Use DuckDB in READ_ONLY mode
- Add script to generate example model output parquet files
- Add metadata for model outputs
- Rename column variant_string to variant to match survey data parquet
- wip wip wip wip
- Make versions soft-coded in metadata endpoint
- Make prevalences parquets include all ancestor region ids, not just region id of most granular level
- Implement prevalences endpoint
- Update example model outputs generator to (1) go back to 1970 more often and (2) not run out of memory when running
- Add instrumentation for timing requests
- Fix survey data requests scoped by admin0
- Response optimizations: columnar format and round high-precision floats
- Rows for survey data, columns for prevalences
- Fix keys/names of rounded columns
- Extract grout region metadata fetch into a startup script
- Extract some consts/types
- Extract some validators
- Extract DuckDB connection
- Extract querying logic
- Refactor querying logic
- Move error handler call to correct place
- Finish implementing query param validators and refactor them
- Tidy comments; extract todos into youtrack tickets
- Reword variable names
- Make node types package match canonical node version
- Apply tsconfig to scripts ts files too
- Tests - iteration 0
- Tests - iteration 1 (refactor fixture generation)
- Remove fixture validation
- Rename GHA workflow
- Small refactors
- Start to type column names; simplify validator test mock
- Alphabetise column types and add unrequestable columns
- Give up having a subset of columns be requestable
- Lots of rewriting tests; remove admin0 format validation
- Make exmaple model outputs generation script a bit more clear
- Remove request timing logger
- Update README.md
- Fix lint command
- Remove tests
- Refactor: make validation-wrapper funcs for two endpoints
- fix f74509c
- Remove some gubbins
- Use DuckDB in READ_ONLY mode
- Don't lint non-existent file
- Don't lint non-existent file
- Remove tests
- Revert "Remove tests"
- Update tests for validator changes and filename changes
- Extract properties from query params only once
- Improve date validation for query parameters
- Fix grammatical error in README.md
- Fix endpointConfigs file path in README
- jsonc in README
- Update main entry point to dist/server.js
- Linting/typing
- Remove tests
- Revert "Remove tests"
- Update tests for validator changes and filename changes
- Update tests
- Use more toStrictEqual
- Add expect.closeTo
- Update GHA versions
- Update README.md
- Add coverage
- Add coverage thresholds
- Lower coverage threshold
- Remove deprecated prevalence columns
- Remove obsolete STAVE dependency
- Update README.md
- Commit missing .env.example
- Round generated model output values
- Update rounded fixtures and docs
scripts/create_example_model_outputs.R writes three parquet files at data/model/2026.05.08/ (one per admin level 0–2) with real GADM region IDs for sub-Saharan Africa fetched from the grout endpoint, variant strings selected (by non-committed code) from WHO target markers, ene/mutation columns derived via variantstring, gapless monthly time series per variant (biased to later years), summary/exceedance value columns, and data support columns (no_of_informing_surveys, nearest_survey_by_time) using real survey IDs from stave_data.rds.
…egion id of most granular level
…ten and (2) not run out of memory when running
Don't validate a different thing than what is interpolated into SQL
Exclude non-date values like 2020-99-99 Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This reverts commit 30505c1.
Co-authored-by: david-mears-2 <60350599+david-mears-2@users.noreply.github.com>
Co-authored-by: david-mears-2 <60350599+david-mears-2@users.noreply.github.com>
Co-authored-by: david-mears-2 <60350599+david-mears-2@users.noreply.github.com>
Co-authored-by: david-mears-2 <60350599+david-mears-2@users.noreply.github.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.