创建数据资源
从存储在本地对象中的个人数据创建自定义的数据资源.
连接到 Twitter 并获取一些数据.
In[1]:=
twitter = ServiceConnect["Twitter"];
In[2]:=
friendgraph = ServiceExecute[twitter, "FriendNetwork"];
Out[2]=
将数据导出到本地对象,并创建一个资源对象.
In[3]:=
lo = Export[LocalObject[], friendgraph, "MX"]
Out[3]=
In[4]:=
ResourceObject[<|
"Name" -> "My Twitter Graph",
"ResourceType" -> "DataResource",
"ContentLocation" -> lo,
"Description" ->
"A network of friendships within my twitter community"
|>]
Out[4]=
找回数据.
In[5]:=
ResourceData["My Twitter Graph"]
Out[5]=