Skip to content

ExampleData

ExampleData serves Wolfram's catalog of example data. Its content is generated by Woxi — drawings instead of photographs, synthesized sound, generated text — but its structure is Wolfram's: the same collections, entries, property names, and metadata such as sizes, counts and types. The examples below therefore show metadata only.

ExampleData[] lists the collections.

$ wo 'Length[ExampleData[]]'
19
$ wo 'MemberQ[ExampleData[], "TestImage"]'
True

ExampleData["collection"] lists its entries as {collection, name} pairs, ready to be passed back in.

$ wo 'ExampleData["TestImage"][[1]]'
{TestImage, Aerial}
$ wo 'Length[ExampleData["Geometry3D"]]'
27

ExampleData[{"collection", "name"}, "Properties"] lists the properties of an entry.

$ wo 'ExampleData[{"Text", "GettysburgAddress"}, "Properties"]'
{Author, FormattedText, FullTitle, Language, Lines, NotebookExpression, String, Title, Words}

Images

$ wo 'ImageDimensions[ExampleData[{"TestImage", "Mandrill"}]]'
{512, 512}
$ wo 'ImageChannels[ExampleData[{"TestImage", "Moon"}]]'
1
$ wo 'ExampleData[{"ColorTexture", "Amboyna"}, "ImageSize"]'
{302, 402}

3D models

$ wo 'ExampleData[{"Geometry3D", "Torus"}, "PolygonCount"]'
8700
$ wo 'Length[ExampleData[{"Geometry3D", "Torus"}, "VertexData"]]'
4487

Audio

$ wo 'AudioSampleRate[ExampleData[{"Audio", "Apollo11ReturnSafely"}]]'
Quantity[11025, Hertz]
$ wo 'ExampleData[{"Sound", "Flute"}, "Channels"]'
1

Text

$ wo 'ExampleData[{"Text", "GettysburgAddress"}, "Author"]'
Abraham Lincoln
$ wo 'Length[ExampleData[{"Text", "GettysburgAddress"}, "Lines"]]'
9

Tables

$ wo 'Dimensions[ExampleData[{"Statistics", "FisherIris"}]]'
{150, 5}
$ wo 'ExampleData[{"Statistics", "FisherIris"}, "ColumnHeadings"]'
{SepalLength, SepalWidth, PetalLength, PetalWidth, Species}
$ wo 'Length[ExampleData[{"MachineLearning", "FisherIris"}, "TrainingData"]]'
105

Matrices and networks

$ wo 'ExampleData[{"Matrix", "494BUS"}, "Dimensions"]'
{494, 494}
$ wo 'ExampleData[{"Matrix", "494BUS"}, "Entries"]'
1666
$ wo 'EdgeCount[ExampleData[{"NetworkGraph", "ZacharyKarateClub"}]]'
78
$ wo 'ExampleData[{"NetworkGraph", "LesMiserables"}, "VertexCount"]'
77

Messages

A name that is not in the catalog is reported.

$ wo 'ExampleData[{"NetworkGraph", "NoSuchNetwork"}]'

ExampleData::notent: "NoSuchNetwork" is not a known entity for the collection "NetworkGraph". Use ExampleData["NetworkGraph"] for a list of entities.
ExampleData[{NetworkGraph, NoSuchNetwork}]

So is a property the entry does not have.

$ wo 'ExampleData[{"TestImage", "Moon"}, "Foo"]'

ExampleData::notpropx: "Foo" is not a known property for {"TestImage", "Moon"}. Use ExampleData[{"TestImage", "Moon"}, "Properties"] for a list of properties.
ExampleData[{TestImage, Moon}, Foo]

Retired entries, such as {"TestImage", "Lena"} and {"TestImage", "TestPattern"}, are no longer listed but are still served, with a warning.

$ wo 'ExampleData[{"TestImage", "Lena"}, "ImageSize"]'

ExampleData::obsolete: {TestImage, Lena} is being deprecated, and may not be available in future versions of Wolfram Language.
{512, 512}