Distinguish the two ways of asking for daily data - #22
Merged
Conversation
The section introduced frequency = "daily" and `dates` one after the other without saying they answer different questions, so it read as two routes to the same place with `dates` merely cheaper. The question that prompted this - whether a date range still returns every day - is the one the section failed to answer. They are now contrasted up front and given a heading each. Every day of a period is frequency = "daily" with years and months, for a continuous series where the gaps between days would matter. Particular days is `dates`, for matching observations. Also documents `dates` as the way to thin a long record, which was implied by "only the days that matter are downloaded" but never shown. Any sequence works, so a decade weekly is one seq() call. The counts in that example are checked rather than estimated: weekly across 2005-2015 is 574 dates against 4,017 days, and parse_dates() takes the Date vector seq() returns unchanged. I had written 4,018, which was an off-by-one on an inclusive date range. Co-Authored-By: Claude Opus 5 <noreply@anthropic.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.
The section introduced
frequency = "daily"anddatesone after the other without saying they answer different questions, so it read as two routes to the same place withdatesmerely cheaper.The question that prompted this — whether a date range still returns every day — is the one the section failed to answer. It does, and now says so.
frequency = "daily"withyearsandmonthsdatesEach gets a heading. Every day in a period is for a continuous series — a time series at one station, an animation, anything where the gaps between days would matter. Particular days is for matching observations.
Thinning a long record
Documented for the first time. It was implied by "only the days that matter are downloaded" but never shown, and it is the answer for anyone who wants a decade without 4,017 downloads:
The counts are checked, not estimated
seq(..., by = "week")over 2005–2015 gives 574 dates against 4,017 days, andparse_dates()takes theDatevectorseq()returns unchanged. I had first written 4,018 — an off-by-one on an inclusive date range — and corrected it after running the arithmetic.Also verified the underlying claim with a live fetch before writing any of this:
frequency = "daily"withyears = 2015, months = 2returns all 28 days of February, 1,344 rows, detected asday.Verification
R CMD check— Status: OK. Full suite green. All README anchors re-checked including the two new subsections.🤖 Generated with Claude Code