Reorganize revision analysis around interpretation questions#1
Open
jingjtang wants to merge 4 commits into
Open
Reorganize revision analysis around interpretation questions#1jingjtang wants to merge 4 commits into
jingjtang wants to merge 4 commits into
Conversation
Author
|
@RoniRos @JavierMtzRdz I would love to hear your thoughts, especially on:
|
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.
Summary
This PR restructures the revision analysis report into a question-driven narrative.
@JavierMtzRdz @RoniRos, the preview link is here:
https://jingjtang.github.io/analysis-notebooks/revision_analysis/revision_hospital_admissions_smoothed_covid19_from_claims_api_state.html
Major changes
1. Reorganized the report structure around analytic questions
The previous report was organized around reporting latency, revision duration, bias, location bias, and convergence as separate technical sections. The new structure follows the reader’s likely workflow:
This makes the report easier to scan and aligns repeated visualizations across overall, location, and time views.
2. Clarified terminology for version, issue, reference date, and lag
Readers may see in the “results at a glance” table that the claims signal starts to be reported at lag 3, but this should not be interpreted as meaning that data are unavailable to Delphi before that point. For some preprocessed API signals, especially smoothed signals, the earliest versions may be intentionally withheld from public reporting because they are not yet reliable enough for interpretation. In this sense, the API
issueorversiondate is better understood as a publication or processing timestamp, rather than necessarily the first date when the underlying raw data became available.The definition of lag was also ambiguous in the previous report. It used two related quantities:
version - first_reportversion - time_value, wheretime_valueis the reference dateThis distinction can be confusing for readers who are not already familiar with the data structure, and it can make some figures harder to compare. In this revision, I make the lag definition consistent throughout the report:
lag = version - time_value
@RoniRos, what do you think about this choice? We can change it back if the previous definition seems more informative for some analyses.
3. Standardized revision-distance and stabilization views
As for the shared “revision distance” definition: abs(published value - latest value) / abs(latest value)
(@JavierMtzRdz @RoniRos, “revision distance” may not be the best name, so suggestions are welcome)
The report reuses this same definition across overall, by-location, and by-season views, making the plots easier to compare. Cumulative stabilization plots and median/IQR revision-distance curves are presented in a more consistent order and style.
4. Improved location-level reporting
Location sections now use HHS region ordering and labels. Location plots include HHS grouping annotations, uppercase state labels, and HHS-region paged views where needed to avoid overcrowded state-level facets.
5. Added surveillance-season time analysis
Calendar-year comparisons were replaced with MMWR week 40-39 surveillance seasons. The report explains this choice and applies it consistently to time-based revision summaries.
6. Expanded exploratory signal-feature diagnostics
Section 5 now explores additional dimensions beyond location and time:
signal magnitude vs. relative spread
revision-distance heatmap by reference date and lag
revision distance by initial publication lag
TODO
Currently works for state-level daily data. Compatibility with weekly and county-level data still needs to be tested.