({{, (RefLink[ResourceObject, paclet:ref/ResourceObject])["name"]
represents a resource with the specified name.}, {, (RefLink[ResourceObject, paclet:ref/ResourceObject])["uuid"]
represents a resource with the specified UUID.}, {, (RefLink[ResourceObject, paclet:ref/ResourceObject])[loc]
imports a resource from the specified location.}, {, (RefLink[ResourceObject, paclet:ref/ResourceObject])[assoc]
gives a resource with content and metadata specified by the association assoc.}})

OpenersNotesSection(Spacer1)Details and Options

Resources can be stored locally, in the cloud, or in a global resource repository.

(RefLink[ResourceObject, paclet:ref/ResourceObject])[str] searches first locally, then in a user's cloud account, and then in global resource repositories.

In (RefLink[ResourceObject, paclet:ref/ResourceObject])["name"], the name must be published in a public repository or registered using (RefLink[ResourceRegister, paclet:ref/ResourceRegister]).

(RefLink[ResourceObject, paclet:ref/ResourceObject])[loc] accepts locations of previous resource object deployments including (RefLink[LocalObject, paclet:ref/LocalObject]) and (RefLink[CloudObject, paclet:ref/CloudObject]).

(RefLink[Get, paclet:ref/Get])[(RefLink[ResourceObject, paclet:ref/ResourceObject])[…]] typically retrieves the primary content of the resource.

(RefLink[Normal, paclet:ref/Normal])[ResourceObject[…]] gives the metadata for a resource, as an association.

(RefLink[ResourceObject, paclet:ref/ResourceObject])[…]["Properties"] gives a list of available metadata items for a resource.

(RefLink[Options, paclet:ref/Options]) and (RefLink[SetOptions, paclet:ref/SetOptions]) can be used with settable properties of (RefLink[ResourceObject, paclet:ref/ResourceObject]).

(RefLink[DeleteObject, paclet:ref/DeleteObject])[ResourceObject[…]] removes the local cache of a resource object.

All resource types share the following standard metadata properties:

Possible standard values for "ResourceType" include:

(RefLink[ResourceSubmit, paclet:ref/ResourceSubmit]) submits a user-created resource for publication in a public repository.

For resources in public repositories, "SourceMetadata" consists of an association whose keys are based on a subset of properties from the Dublin Core metadata standard:

Data Resources

Typical elements in a retrieved data resource include:

Typical elements that can be used in constructing a data resource include:

OpenersPrimaryExamplesSection(Spacer1)Examples  (11)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Retrieve a data resource from the data repository:

ro=ResourceObject["Gettysburg Address"]

Import the content using (RefLink[ResourceData, paclet:ref/ResourceData]):

First@TextCases[ResourceData[ro],"Paragraph"]

Retrieve a neural network from the neural net repository:

ro=ResourceObject["LeNet Trained on MNIST Data"]

Get the (RefLink[NetChain, paclet:ref/NetChain]) with (RefLink[ResourceData, paclet:ref/ResourceData]):

ResourceData[ro]

Get a function resource from the function repository:

ro=ResourceObject["ColorToHex"]

Get the included function with (RefLink[ResourceFunction, paclet:ref/ResourceFunction]):

toHex=ResourceFunction[ro]

Use the function:

(Row[, (Spacer1), "ColorToHex"])[Red]

AssociationMap[(Row[, (Spacer1), "ColorToHex"]),NestList[Darker,Red,5]]

Define a new custom data resource object:

primes=ResourceObject[<|"Name"->"One hundred primes",
"ResourceType"->"DataResource","Content"->Table[Prime[n],{n,100}],
"Description"->"The first hundred prime numbers"|>]

Retrieve the data:

Get[primes]

OpenersExampleSection1(Spacer1)Scope  (5)

Define a new function resource:

mapFromHere=ResourceObject[<|"ResourceType"->"Function","Name"->"MapFromHere",
"Description"->"Create a map showing directions from here to anywhere","Function"->(GeoGraphics[Style[Line[TravelDirections[{Here,Interpreter["Location"][#]}]],Thick,Red]]&)|>]

ResourceFunction[mapFromHere]["Chicago"]

Deploy it to a cloud object to share:

co=CloudPublish[mapFromHere]

The function is now usable with (RefLink[CloudObject, paclet:ref/CloudObject]) by anyone:

ResourceFunction[co]["San Antonio"]

Newly created resource objects are only stored in memory for the current session:

ro=ResourceObject[<|
"Name"->"All about whales",
"ContentElements"-><|"Article"->WikipediaData["Whales"],"Image"->First[WebImageSearch["Whales",MaxItems->1]]|>,
"DefaultContentElement"->"Article",
"ResourceType"->"Data",
"Keywords"->{"whales"},
"Description"->"Wikipedia article on whales from "<>DateString[]
|>]

ResourceData[ro]//Snippet

Use (RefLink[LocalCache, paclet:ref/LocalCache]) to store a resource locally for future use:

LocalCache[ro];

Quit

ResourceSearch["whales"]

Create a multipart data resource object:

ro=ResourceObject[<|"Name"->"Factorials to 3",
"ResourceType"->"DataResource",
"Description"->"The first three factorials",
"ContentElements"-><|"one"->1!,"two"->2!,"three"->3!|>|>]

Retrieve one element:

ResourceData[ro,"three"]

Retrieve all the elements:

ResourceData[ro]

Delete the resource:

DeleteObject[ro]

Reference a data repository resource by ID:

odyssey=ResourceObject["f70072ed-f6d7-475b-aa83-97153c4551c7"]

Snippet[ResourceData[odyssey]]

Create a word cloud from a data resource using a specific element:

words=ResourceData[ResourceObject["Friends, Romans, Countrymen"],"Words"];
Short[words]

WordCloud[DeleteStopwords[Sort[words]]]

OpenersExampleSection3(Spacer1)Properties & Relations  (2)

A user-created resource cannot immediately be referenced by name in (RefLink[ResourceObject, paclet:ref/ResourceObject]):

ro=ResourceObject[<|"ResourceType"->"Function",
"Name"->"AddThreeAndSquare",
"Function"->((#+3)^2&),
"Description"->"Add three to any number, then square the result"|>]

ResourceFunction["AddThreeAndSquare"][10]

Use (RefLink[ResourceRegister, paclet:ref/ResourceRegister]) to register the name:

ResourceRegister[ro]

ResourceFunction["AddThreeAndSquare"][10]

Explore the properties of a data resource:

ro=ResourceObject["Friends, Romans, Countrymen"]

ro["Properties"]

ro["ContentElements"]

ro["DocumentationLink"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ResourceData, paclet:ref/ResourceData])  ▪  (RefLink[ResourceSearch, paclet:ref/ResourceSearch])  ▪  (RefLink[NetModel, paclet:ref/NetModel])  ▪  (RefLink[ResourceFunction, paclet:ref/ResourceFunction])  ▪  (RefLink[ResourceSubmit, paclet:ref/ResourceSubmit])  ▪  (RefLink[Databin, paclet:ref/Databin])  ▪  (RefLink[CloudObject, paclet:ref/CloudObject])  ▪  (RefLink[LocalObject, paclet:ref/LocalObject])  ▪  (RefLink[ResourceRegister, paclet:ref/ResourceRegister])  ▪  (RefLink[PersistentObject, paclet:ref/PersistentObject])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Knowledge Representation & Access, paclet:guide/KnowledgeRepresentationAndAccess])}, {▪(RefLinkPlain[Wolfram Resource System, paclet:guide/WolframResourceSystem])}, {▪(RefLinkPlain[Wolfram Data Repository, paclet:guide/WolframDataRepository])}, {▪(RefLinkPlain[Persistent Storage, paclet:guide/PersistentStorage])}, {▪(RefLinkPlain[WDF (Wolfram Data Framework), paclet:guide/WDFWolframDataFramework])}, {▪(RefLinkPlain[Wolfram Function Repository, paclet:guide/WolframFunctionRepository])}})}})

({{(Spacer1), ({{(Spacer1)Related Links}, {(WebLink[DocumentationFooterIconsRelatedLinks-DataRepository.png(Spacer1)Wolfram Data Repository, http://datarepository.wolframcloud.com])}, {(WebLink[DocumentationFooterIconsRelatedLinks-NeuralNetRepository.png(Spacer1)Neural Network Repository, http://resources.wolframcloud.com/NeuralNetRepository])}})}})