Created
October 9, 2025 09:00
-
-
Save PietrH/72ac968ec9a467ee7d509e16a3641072 to your computer and use it in GitHub Desktop.
Get RATO data as flat table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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