datapond is a registry of curated
DuckDB databases built from public data. Each database is a single
.duckdb file hosted on Hugging Face. This package attaches
those files over HTTP so that only the byte ranges your query touches
are transferred, or downloads them once for local use.
dp_connect() returns an ordinary DuckDB
DBIConnection:
Every database ships a data dictionary; dp_describe()
reads it:
dp_describe(con) # tables
dp_describe(con, table = "proceedings") # columns, types, null %, join hints
dp_describe(con, search = "judge") # columns by namedbplyr works unchanged:
Pass a vector of ids. Tables are then qualified by database id, and ids that contain a hyphen must be double-quoted in SQL:
Remote mode is cheap for counts and filters but SELECT *
over a large table transfers most of the file. Download once for disk
speed:
dp_download("dol-visas")
con <- dp_connect("dol-visas", local = TRUE)
dp_update("dol-visas") # re-download only if the registry is newerSet options(datapond.data_dir = "~/.datapond") to share
downloads with the Python package.