Skip to content

Instantly share code, notes, and snippets.

@cboettig
Created June 22, 2023 22:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cboettig/cf52e1ca8e3513707d6c62d478414c84 to your computer and use it in GitHub Desktop.
Save cboettig/cf52e1ca8e3513707d6c62d478414c84 to your computer and use it in GitHub Desktop.
arrow you are ridiculous right now...
library(duckdbfs)
library(dplyr)
remotes::install_github("cboettig/duckdbfs")
library(arrow)
s3 <- s3_bucket("tern4cast-inventory", endpoint_override = "data.ecoforecast.org")
s3$ls("tern4cast-forecasts")
df <- open_dataset(s3$path("tern4cast-forecasts")) |> collect()
names(df) <- c("parquet", "theme", "model_id", "reference_datetime", "date", "part")
urls <- df |> filter(part == "part-0.parquet") |>
mutate(urls = paste("https://data.ecoforecast.org/tern4cast-forecasts",
parquet, theme, model_id, reference_datetime, date, part, sep="/")) |>
pull(urls)
ds <- open_dataset(urls)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment