-
Notifications
You must be signed in to change notification settings - Fork 12
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
Unintended change in types of axes in hyper_tibble output after ver. 0.4.0 update? #128
Comments
Definitely not intended, I'll explore ty |
Ok this was introduced as part of the CF timestamp change, @pvanlaake - I haven't isolated it yet but will try to do so in coming days. I should have had a test for that, whoops |
This is caused by an oversight: in the code the tibble was constructed from the Note that for the "time" axis, the timestamps in the tibble are, and should be, of character type. Under the CF Metadata Conventions there are 9 different calendars and only 3 are compatible with POSIXt. Character strings can accommodate all of them. In this particular data set the "calendar" attribute is not given, meaning that it is assumed to be a "standard", POSIXt-compatible calendar, but for consistency all timestamps are given as a character string. You can convert to |
Thanks @pvanlaake ! I agree about the timestamps |
Fixing character lat/long columns in hypertibble() #128
With the update to version 0.4.0, the return type of the axes in
hyper_tibble
has been changed. Specifically, in the case of sample meteorological data (#114),lat
,lon
, andtime
have been converted from numerics to characters. Is this an intentional change?The output of
hyper_transforms
remains numeric both before and after the update, and it works with numeric types during filtering as well. In version 0.4.0, it now seems necessary to manually convert the types using something liketidync("gistemp250_GHCNv4.nc") |> hyper_tibble() |> dplyr::mutate(lat = as.numeric(lat), ...)
, which adds a bit of extra effort.Many thanks!
Session Info
The text was updated successfully, but these errors were encountered: