Tip
If you already have a Yellowbrick instance running, skip the steps to set up and clean up Yellowbrick.
-
Install R packages
adbcdrivermanager,arrow, andtibble:install.packages(c("adbcdrivermanager", "arrow", "tibble"))
Warning
On Apple Silicon Macs, Yellowbrick Community Edition works with OrbStack but not with Docker Desktop.
-
Start a Yellowbrick Community Edition instance:
docker run -d --rm --privileged --name yellowbrick -p 443:443 -p 5432:5432 yellowbrickdata/yb-community-edition:latest
-
Wait for the service to be ready (it should print
localhost:5432 - accepting connections):docker exec yellowbrick pg_isready -h localhost -p 5432
-
Install the PostgreSQL ADBC driver:
dbc install postgresql
-
Customize the R script
main.Ras needed- Change the connection arguments in
adbc_database_init()- Format
uriaccording to the connection URI format used by PostgreSQL, or keep it as is
- Format
- Change the SQL SELECT statement in
read_adbc()if desired
- Change the connection arguments in
-
Run the R script:
Rscript main.R
Stop the Docker container running Yellowbrick:
docker stop yellowbrick