select.bcdc_promise | R Documentation |
Similar to a dplyr::select
call, this allows you to select which columns you want the Web Feature Service to return.
A key difference between dplyr::select
and bcdata::select
is the presence of "sticky" columns that are
returned regardless of what columns are selected. If any of these "sticky" columns are selected
only "sticky" columns are return. bcdc_describe_feature
is one way to tell if columns are sticky in advance
of issuing the Web Feature Service call.
See dplyr::select
for details.
## S3 method for class 'bcdc_promise'
select(.data, ...)
.data |
object of class |
... |
One or more unquoted expressions separated by commas. See details. |
select(bcdc_promise)
: select.bcdc_promise
try(
feature_spec <- bcdc_describe_feature("bc-airports")
)
try(
## Columns that can selected:
feature_spec[feature_spec$sticky == TRUE,]
)
## Select columns
try(
res <- bcdc_query_geodata("bc-airports") %>%
select(DESCRIPTION, PHYSICAL_ADDRESS)
)
## Select "sticky" columns
try(
res <- bcdc_query_geodata("bc-airports") %>%
select(LOCALITY)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.