-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
list_vpts_aloft() #579
list_vpts_aloft() #579
Conversation
merge master into download_vpts_aloft
Codecov Report
@@ Coverage Diff @@
## master #579 +/- ##
==========================================
+ Coverage 67.80% 68.68% +0.88%
==========================================
Files 58 59 +1
Lines 3165 3254 +89
==========================================
+ Hits 2146 2235 +89
Misses 1019 1019
|
401df4a
to
d1d90fa
Compare
verbose is used differently (as write to stdout) in other functions
Currently the function stops on an error if a radar station is provided that doesn't exist, however, when data for an existing radar station is simply missing, the function will offer a warning and continue to provide links for all other available data. Do we want to stop on an error when no data is available for any of the provided radar stations? |
used twice in `list_vpts_aloft()`
Good. Does it warn only once per radar (preferred) or also when time ranges are missing. I'm also fine with not having a warning for any missing data.
No, just return an empty vector of paths |
I've decided to remove my If this is overly defensive, feel free to revert d2c1e65. I vastly prefer using |
The warnings for radars and time ranges are independent, so it'll warn first if you are requesting a radar station that exists but has no data for your time range. Then it'll warn again if data was found for only a subset of the date range that was requested. So you'll get two warnings at the maximum.
Currently we are stopping on the error |
Ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
STATUS: READY FOR REVIEW
We have decided to build a function list_vpts_aloft() that returns a vector of urls that are known to exist, given the filtering parameters originally envisioned for download_vpts_alof()
Checking if a file exists can be done using the aws.s3 dependency via:
aws.s3::get_bucket_df(bucket = "s3://aloft", prefix="baltrad/monthly", region = "eu-west-1", max = 2000)
or much slower usinghttr: urls[!furrr::future_map_lgl(urls, ~httr::http_error(httr::HEAD(.x)))]
Dependencies
dplyr
andmagrittr
pipes, so depend on replace data.table inregularize_vpts
#574 to introduce them into the namespace.Scope
Currently only
format = "csv"
is supportedTodo
aws.s3
to Suggestspurrr
&jsonlite
to Suggestsconsider using lubridate in filter instead of stringsconsider removing hard coded dates when not provided_pkgdown.yml
Stop when a radar is missingverbose
argument to silence warningsNEWS.md
jsonlite
dependencyextract_string
helper: used twicepurrr
dependency