Closed elray1 closed 1 year ago
Name | Link |
---|---|
Latest commit | 74df23a4e7881f48c77a1b1fafec6b2d4ddd38a7 |
Latest deploy log | https://app.netlify.com/sites/covid-19-hub-vizualization/deploys/6375240130f35100081fff60 |
Deploy Preview | https://deploy-preview-95--covid-19-hub-vizualization.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
I'm confused why this line is min
and not max
:
initial_as_of <- as.character(min(available_as_ofs[["death"]]))
The idea is that on that line, I'm just initializing it to the lowest possible value, and then below that I'm looping over all of the as_of
dates and updating to a more recent as_of
date only if the forecast file exists. Extracting the logic/skipping other lines:
initial_as_of <- as.character(min(available_as_ofs[["death"]])) # some initial value that will be updated later
for (as_of in as.character(as_ofs)) {
...
if (file.exists(file_path)) {
...
initial_as_of <- max(initial_as_of, as_of) # update to the later as_of date only if there are forecasts for that date
}
}
Sounds good!
Resolves the second item under issue #94