cbs_search | R Documentation |
Find tables containing search words.
cbs_search(
query,
catalog = "CBS",
language = "nl",
format = c("datasets", "docs", "raw"),
verbose = FALSE,
...
)
query |
|
catalog |
the subset in which the table is to be found, see
|
language |
should the |
format |
format in which the result should be returned, see details |
verbose |
|
... |
not used |
The format
can be either:
datasets
: the same format as cbs_get_datasets()
, with an extra score
column.
docs
: the table results from the solr query,
raw
: the complete results from the solr query.
if (interactive()){
# search for tables containing the word birth
ds_en <- cbs_search("Birth", language="en")
ds_en[1:3, c("Identifier", "ShortTitle")]
# or in Dutch
ds_nl <- cbs_search(c("geboorte"), language="nl")
ds_nl[1:3, c("Identifier", "ShortTitle")]
# Search in an other catalog
ds_rivm <- cbs_search(c("geboorte"), catalog = "RIVM", language="nl")
ds_rivm[1:3, c("Identifier", "ShortTitle")]
# search in all catalogs
ds_all <- cbs_search(c("geboorte"), catalog = NULL, language="nl")
# docs
docs <- cbs_search(c("geboorte,sterfte"), language="nl", format="docs")
names(docs)
docs[1:2,]
#raw
raw_res <- cbs_search(c("geboorte,sterfte"), language="nl", format="raw")
raw_res
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.