Closed nasaownsky closed 3 years ago
Awesome! Sorry for the delay on this @nasaownsky, here is a link to the annual fixture file: https://drive.google.com/file/d/1F7tCpTxUWEud6qDoPNB2_ZmBG3VLvx0p/view?usp=sharing
This has the same format as the existing data file, but with annual data instead of monthly. I thought that just providing the data in a separate file would be the easiest way to support this, will that work for you?
Additionally a few comments from my first pass at reviewing this:
Only the first chart was switched to bars, the rest still show lines. I believe they should all be bars.
When dropping in the annual data, it changes the time horizon to "5 years" but displays the last 5 months. When expanding to all time it still tries to show a bar for every month, even though there is only data once per year.
Additionally, we noticed that in some cases, we have to use older data than what is available in order to create the yearly metrics shown with the Annual tab. In these cases, we'll want to add a warning tooltip to let the user know that we are artificially restricted the data, and that there is more recent data available in the Monthly tab.
I updated the main description for #80 with this change, but copying it down below for convenience.
Data is restricted to older reports in order to match the other reports shown; however, more recent data is available (as of [DATE YEAR of most recent data for the metric]). Use the Reporting Frequency switch at the top of the page to see the most recent monthly data.
As a bonus, the orange link in the design above ("Reporting Frequency switch") should scroll the user back to the page position where the data reporting frequency link can be found.
@hobuobi How should I know if the data is artificially restricted?
For that additional tooltip humphrey described, I think the easiest way to implement it would be to compare the data for that state and metric in the monthly and annual files. If there is newer data in the monthly file, then add that note to the annual block.
Do you think that will work? Otherwise we can do it in the backend when producing the files, but didn't want to clutter them any more if we didn't need to.
@colincadams ok, I think that'll work & try to make that work tomorrow. For now please check the latest changes and see if there's new potential problems to fix. Thanks!
@colincadams You can check new tooltip on California dashboard!
@colincadams Described case can happen vice versa. So I've made solution that suites for annual and monthly data, but we need more general text for tooltip since the function doesn't know what data we are viewing. I suggest something like:
Data is not available in a public report from [STATE] in this data aggregation range; however, data is available in another range. Use the Reporting Frequency switch at the top of the page to see the most recent available data.
I think the preference would be to have a separate error message for monthly vs annualized data! If that is possible, I would agree with Colin's solution for the case where data is available in the annual view.
Monthly data is not available in a public report from [STATE]; however, annual data is available (as of [DATE YEAR of most recent data for the metric]). Use the Reporting Frequency switch at the top of the page to see the annual data.
If we have to do something that works for both cases, I would do something like:
Data is not available in a public report from [STATE] at this reporting frequency; however, more data is reported [MONTHLY / ANNUALLY (depending on which tab you're on)]. Use the Reporting Frequency switch at the top of the page to see the most recent available data.
@colincadams @hobuobi I've added desired solution for that case. Depending on available data there will be one of two options to display:
Please check & confirm.
@colincadams Latest commit should fix slider, but more test only can be performed when we decide to merge main
with v2-jails
.
@colincadams Let's cover that case in new Issue. @jessex I think we're ready to merge this pr.
@nasaownsky just need you to address the merge conflict that popped up from merging the latest PR and then I will merge. Thanks!
@jessex You're good to go!
Description of the change
MainPage
along with newSwitch
componentType of change
Related issues
Checklists
Development
These boxes should be checked by the submitter prior to merging:
Code review
These boxes should be checked by reviewers prior to merging: