Add compatibility (docs + extra checks) for external data use#50
Merged
Conversation
We no longer need this for processing
Contributor
Author
|
Linked to issue #42 |
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.
This PR:
get_fcast(). Note that using ones' own data is an alternative path to fetching NHSN data with ourget_data().get_fcast()andto_respilens():get_fcast(): explicitly requires thatget_fcast()dfparameter havetargetandlocationcolumns (in addition totarget_end_dateandobservation)get_fcast(): throws an error if there is more than one unique location or unique target in thedfparameterto_respilens(): throws an error if themodel_out_tblororacle_outputcomponents of the parameter have more than one unique locationSeparately, I also removed the codebase's dependency on
loc_data. Because we want to aim to accommodate external data, we can't possibly have location metadata that covers every possible location. So,to_respilens()(which was the only thing that neededloc_data) simply just broadcasts the value inmodel_out_tbl$location[1]across every location-related metadata entry. MyRespiLens doesn't need abbreviation, location_name, location, and population to function correctly. It just needs a single location name.