cites_db | R Documentation |
Returns a connection to the local CITES database. This is a DBI-compliant
duckdb::duckdb()
database connection. When using dplyr-based
workflows, one typically accesses tables with functions such as
cites_shipments()
, but this function lets one interact with the database
directly via SQL.
cites_db(dbdir = cites_path())
dbdir |
The location of the database on disk. Defaults to
|
A DuckDB DBI connection
if (cites_status()) {
library(DBI)
dbListTables(cites_db())
parties <- dbReadTable(cites_db(), "cites_parties")
dbGetQuery(
cites_db(),
'SELECT "Taxon", "Importer" FROM cites_shipments WHERE "Year" = 1976 LIMIT 100;'
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.