So, I'm now trying use ResourceData to push my data into the cloud. Then I want to reference that data in another NB to process it. Seems simple enough.
importSpreadsheet[] := Module[{items, names, data, assoc},
items =
Import["/Users/wkr/Documents/Elections/Closing Graph.csv",
"CSV"];
names = items // First;
data = items // Rest;
assoc = AssociationThread[names, #] & /@ data;
Dataset[assoc]
];
buildDataResource[ds_] := Module[{},
ResourceObject[Association[
"ResourceType" -> "DataResource",
"Name" -> "ElectionCloseDataset",
"Content" -> ds,
"Description" ->
"Dataset created from the Closing Graph Spreadsheet"
]]];
storeGraphDataset[] := Module[{ds},
ds = importSpreadsheet[];
buildDataResource[ds]
];
Now, generate a resource object and deploy to the cloud
ro = storeGraphDataset[];
CloudDeploy[ro, "ElectionCloseDataset"]
The above seems to work.
Now, in order to use this resource, I want get back the dataset portion of the resource, with code in a different NB.
ro = ResourceSearch["ElectionCloseDataset", ResourceObject]
I get back the resource object but none of my attempts to return the dataset that should be in the ResourceObject works.
What is the correct syntax?