-
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
add names method for bcdc_promise #278
Conversation
Actually this isn't as simple as I thought. Out of the box, the method doesn't respect previous R> library(bcdata)
R> bcdc_query_geodata('2af1388e-d5f7-46dc-a6e2-f85415ddbd1c') %>%
names()
[1] "id" "LINEAR_FEATURE_ID" "WATERSHED_GROUP_ID" "EDGE_TYPE"
[5] "WATERBODY_KEY" "BLUE_LINE_KEY" "WATERSHED_KEY" "FWA_WATERSHED_CODE"
[9] "LOCAL_WATERSHED_CODE" "WATERSHED_GROUP_CODE" "DOWNSTREAM_ROUTE_MEASURE" "LENGTH_METRE"
[13] "FEATURE_SOURCE" "FEATURE_CODE" "GEOMETRY" "OBJECTID"
[17] "SE_ANNO_CAD_DATA" "FEATURE_LENGTH_M"
R>
R> bcdc_query_geodata('2af1388e-d5f7-46dc-a6e2-f85415ddbd1c') %>%
select(EDGE_TYPE) %>%
names()
[1] "id" "LINEAR_FEATURE_ID" "WATERSHED_GROUP_ID" "EDGE_TYPE"
[5] "WATERBODY_KEY" "BLUE_LINE_KEY" "WATERSHED_KEY" "FWA_WATERSHED_CODE"
[9] "LOCAL_WATERSHED_CODE" "WATERSHED_GROUP_CODE" "DOWNSTREAM_ROUTE_MEASURE" "LENGTH_METRE"
[13] "FEATURE_SOURCE" "FEATURE_CODE" "GEOMETRY" "OBJECTID"
[17] "SE_ANNO_CAD_DATA" "FEATURE_LENGTH_M" |
@boshek I love the idea! |
This works now: R> bcdc_query_geodata('2af1388e-d5f7-46dc-a6e2-f85415ddbd1c') %>%
names()
[1] "id" "LINEAR_FEATURE_ID" "WATERSHED_GROUP_ID"
[4] "EDGE_TYPE" "WATERBODY_KEY" "BLUE_LINE_KEY"
[7] "WATERSHED_KEY" "FWA_WATERSHED_CODE" "LOCAL_WATERSHED_CODE"
[10] "WATERSHED_GROUP_CODE" "DOWNSTREAM_ROUTE_MEASURE" "LENGTH_METRE"
[13] "FEATURE_SOURCE" "FEATURE_CODE" "OBJECTID"
[16] "SE_ANNO_CAD_DATA" "FEATURE_LENGTH_M" "geometry"
R> bcdc_query_geodata('2af1388e-d5f7-46dc-a6e2-f85415ddbd1c') %>%
select(EDGE_TYPE) %>%
names()
[1] "id" "LINEAR_FEATURE_ID" "WATERSHED_GROUP_ID" "EDGE_TYPE"
[5] "WATERSHED_GROUP_CODE" "LENGTH_METRE" "FEATURE_SOURCE" "FEATURE_CODE"
[9] "OBJECTID" "geometry" |
@ateucher - I don't think these failures are related to this PR. |
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.
This looks great! Just one super minor suggestion, otherwise I think it's good to merge. Thanks for doing this!
Co-authored-by: Andy Teucher <andy.teucher@gov.bc.ca>
Add
names
method to extract column names easily.@ateucher if you think this is a good idea, I'll add some tests.