Description Usage Arguments Value References See Also Examples
Wrapper functions around the SODA API's queries: select
, where
, order
, group
, and q
.
1 2 3 4 5 | soql_select(soql_list, select_clause)
soql_where(soql_list, where_clause)
soql_order(soql_list, column, desc = FALSE)
soql_group(soql_list, group_clause)
soql_q(soql_list, q_clause)
|
soql_list |
The |
select_clause, where_clause, group_clause, q_clause |
String to be used as the given clause in the query. |
column |
Column name to be ordered by. |
desc |
Whether to order descending. |
Returns a new soql
object, with parameters added, for use in other functions.
Documentation about these queries on the SODA website
soql_simple_filter
for an easier method of doing where
with equality.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | if (require(magrittr)) {
# With pipes
my_url <- soql() %>%
soql_select("height,weight") %>%
soql_where("height > 30") %>%
soql_order("height", desc=TRUE) %>%
soql_group("type") %>%
soql_q("a") %>%
as.character()
} else {
# Without pipes
soql_chain <- soql()
soql_chain <- soql_select(soql_chain, "height,weight")
soql_chain <- soql_where(soql_chain, "height > 30")
soql_chain <- soql_order(soql_chain, "height", desc=TRUE)
soql_chain <- soql_group(soql_chain, "type")
soql_chain <- soql_q(soql_chain, "a")
my_url <- as.character(soql_chain)
}
|
Loading required package: magrittr
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.