-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix key modifications for non-valid column names in osmdata_* functions #303
Conversation
1a3ea5a
to
be8045d
Compare
As per ?make.names, valid syntactic names only include letters, numbers and the dot or underline characters and starts with a letter. For example, many keys in OSM contain also «:» which get transformed to «.», then «name:ca» becomes «name.ca»
be8045d
to
8c27fc7
Compare
Rename keys to key.n and throw a warning
4399be2
to
9ced955
Compare
# Conflicts: # R/get-osmdata.R
Ready for review, @mpadge ! I'm not sure how silicate objects should handle clashes between tags and id or metadata keys |
That's a good question, but one that i'm happy to worry about later. As said, I'm pretty confident the only use of |
A few minor suggestions there. Let me know when they're done, and i'll happily merge. This is, as with all the others, a really good PR. Thank you so much! The |
Co-authored-by: mark padgham <mark.padgham@email.com>
Co-authored-by: mark padgham <mark.padgham@email.com>
Thanks for the review, @mpadge ! I think it's ready now |
Not quite. The tests are failing because of this: devtools::load_all ()
#> ℹ Loading osmdata
#> Data (c) OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright
qry <- opq (bbox = c (-0.116, 51.516, -0.115, 51.517))
qry <- add_osm_feature (qry, key = "highway")
res <- osmdata_data_frame (qry)
#> Error in matrix(nrow = nrow(i), ncol = length(keys), dimnames = list(NULL, : non-numeric matrix extent Created on 2023-01-31 with reprex v2.0.2 |
Pretty sure this is the problem: |
indeed, that was the problem. All green now, @mpadge Can try to add the NEWS update too |
Cool, thanks. Great that the tests now pass. Let me know when you've updated the news, and we'll merge away ... |
FIX #301 and handle cases with clashes between OSM keys and id or metadata columns