Skip to content

Instantly share code, notes, and snippets.

@PietrH
Created October 9, 2025 09:00
Show Gist options
  • Save PietrH/72ac968ec9a467ee7d509e16a3641072 to your computer and use it in GitHub Desktop.
Save PietrH/72ac968ec9a467ee7d509e16a3641072 to your computer and use it in GitHub Desktop.
Get RATO data as flat table
# Get all rato data as a flat csv
if(!rlang::is_installed("ratatouille", version = "1.0.4")){
pak::pak("inbo/ratatouille")
}
library(ratatouille)
# To run this function you need to store your RATO database credentials as env variables, as RATO_USER and RATO_PWD, otherwise you'll get an error.
all_rato_data <- ratatouille()
readr::write_rds(all_rato_data, file = paste0(format(Sys.time(), "%Y_%m_%d-%H_%M"),"_rato_data.rds"))
readr::write_csv(all_rato_data, file = paste0(format(Sys.time(), "%Y_%m_%d-%H_%M"),"_rato_data.csv"))
readr::write_csv(all_rato_data, file = paste0(format(Sys.time(), "%Y_%m_%d-%H_%M"),"_rato_data.csv.gz"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment