LTER-LIFE / VeluweProtoDT

Veluwe proto-DT: a digital mini twin of tree phenology and climate scenarios
0 stars 0 forks source link

Add data frame as a valid input/output type in the VRE #52

Open CherineJ opened 9 months ago

CherineJ commented 9 months ago

Cells in the Jupyter notebook in the VRE are linked based on their recognised output and input (also see #49). Data frames are a very common object type in R but are not one of the four options (i.e., float, numeric, string, list) in the VRE.

Gabriel and Spiros will look into adding data frame as a valid cell input/output type.

StefanVriend commented 9 months ago

Shortcut

Adapted from original issue by Cherine As long as we cannot specify data frames as an output object of a cell, we will take the shortcut of writing the output to CSV and read these CSV back in in the next cell.

Remaining hurdle

However, this still leaves us with the issue that the cell that writes a CSV has no other output that can be linked to the input of the next cell and we therefore need to figure out how to link the containers anyway.

CherineJ commented 8 months ago

Shortcut No. 2

Cells that only write to CSV can be linked by creating a dummy variable that contains the path of the written CSV file. This dummy can then be assigned as output and input in the respective cells. and makes them connectable.