


source("modules/Loading/Loading.R")
library(metaclipR)
library(loadeR)
library(transformeR)
library(metaclipR)

recipe_file <- "recipes/atomic_recipes/recipe_seasonal_provenance.yml"
recipe <- prepare_outputs(recipe_file)

data <- Loading(recipe)

xyCoords<-list("x","y")

xyCoords$x<-data$hcst$coords$latitude [1:22]
xyCoords$y<-data$hcst$coords$longitude [1:53]

graph1<-metaclipR.SpatialExtent(xyCoords=xyCoords)

graph<- metaclipR.DatasetSubset(package = "transformeR",
  version = as.character(packageVersion(package)), graph = NULL,
  fun = "metaclipR.SpatialExtent", arg.list = list("xyCoords"), output = NULL,
  RefSpatialExtent = graph1, xmin = NULL, xmax = NULL, ymin = NULL,
  ymax = NULL, proj = NULL, resX = NULL, resY = NULL,
  disable.command = FALSE)

plot(graph$graph)
graph2json(graph, "/esarchive/scratch/apuiggro/graph22.json")



