nc_query_table | R Documentation |
Generate custom table queries with the table name and filter arguments.
nc_query_table(
table = NULL,
...,
username = NULL,
timeout = 120,
verbose = FALSE
)
table |
Character. Table to query (see details) |
... |
Name/value pairs for custom queries/filters (see details) |
username |
Character vector. Username for http://naturecounts.ca. If provided, the user will be prompted for a password. If left NULL, only public collections will be returned. |
timeout |
Numeric. Number of seconds before connecting to the server times out. |
verbose |
Logical. Show messages? |
nc_query_table(username = "sample")
for available options
data.frame()
# What tables are available? What 'filters' do they take? Are any 'required'?
nc_query_table(username = "sample")
# Query the bmdefilter_bad_dates table
d <- nc_query_table(table = "bmde_filter_bad_dates", username = "sample")
head(d)
# Filter our query
d <- nc_query_table(table = "bmde_filter_bad_dates",
SiteCode = "DMBO", username = "sample")
d
# Filter our query
d <- nc_query_table(table = "bmde_filter_bad_dates",
species_id = 15770, username = "sample")
# Want more than one species? Either filter after, or combine two queries
# Filter after
library(dplyr)
d <- nc_query_table(table = "bmde_filter_bad_dates", username = "sample")
d <- filter(d, species_id %in% c(15770, 9750))
# Combine two queries
d1 <- nc_query_table(table = "bmde_filter_bad_dates",
species_id = 15770, username = "sample")
d2 <- nc_query_table(table = "bmde_filter_bad_dates",
species_id = 9750, username = "sample")
d <- rbind(d1, d2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.