({{, (RefLink[EntityClass, paclet:ref/EntityClass])["type",name] 
represents a class of entities of the specified type identified by name.}, {, (RefLink[EntityClass, paclet:ref/EntityClass])["type",{(Subscript[property, 1])->(Subscript[vspec, 1]),(Subscript[property, 2])->(Subscript[vspec, 2]),…}]
represents an implicitly defined entity class containing entities of the specified type for which the properties (Subscript[property, i]) conform to the value selector (Subscript[vspec, i]).}, {, (RefLink[EntityClass, paclet:ref/EntityClass])[cspec,psel]
represents an entity class with members specified by cspec, selected by the property selector psel.}})

OpenersNotesSection(Spacer1)Details

Built-in (RefLink[Entity, paclet:ref/Entity]) objects can be specified with natural language using (Key1[ctrl, ==]).

In (RefLink[Entity, paclet:ref/Entity])["type",name], the type can be either a built-in entity type or a type specified in an (RefLink[EntityStore, paclet:ref/EntityStore]) registered with (RefLink[EntityRegister, paclet:ref/EntityRegister]).

Implicitly defined entity classes can be resolved into canonically named entities using (RefLink[EntityList, paclet:ref/EntityList])[EntityClass["type",{(Subscript[property, 1])->(Subscript[value, 1]),(Subscript[property, 2])->(Subscript[value, 2]),…}]].

An implicitly defined entity class represents all entities that fulfill all the specified restrictions on property values.

Property values in implicitly defined entity classes may make use of (RefLink[Quantity, paclet:ref/Quantity]) (and intervals of (RefLink[Quantity, paclet:ref/Quantity])) for dimensional values, (RefLink[Between, paclet:ref/Between]) for numeric values, (RefLink[DateObject, paclet:ref/DateObject]) for dates, (RefLink[TakeLargest, paclet:ref/TakeLargest]) and (RefLink[TakeSmallest, paclet:ref/TakeSmallest]) for ordinal selections, and (RefLink[ContainsAll, paclet:ref/ContainsAll]), (RefLink[ContainsExactly, paclet:ref/ContainsExactly]), (RefLink[ContainsAny, paclet:ref/ContainsAny]), (RefLink[ContainsOnly, paclet:ref/ContainsOnly]), (RefLink[ContainsNone, paclet:ref/ContainsNone]) for entities. Lists of entities are interpreted as (RefLink[ContainsAll, paclet:ref/ContainsAll]), while a single entity is interpreted as (RefLink[ContainsAny, paclet:ref/ContainsAny])[{entity}].

(RefLink[Information, paclet:ref/Information]) of an (RefLink[EntityClass, paclet:ref/EntityClass]) expression will give different properties depending on the (RefLink[EntityTypeName, paclet:ref/EntityTypeName]) associated with the expression.

OpenersPrimaryExamplesSection(Spacer1)Examples  (13)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Use the (Key1[ctrl, ==]) (RefLink[WolframAlpha, paclet:ref/WolframAlpha]) interface to discover particular entities:

InputForm[LinguisticAssistant]

Represent all of the countries in Europe:

EntityClass["Country","Europe"]

Get a list of all the countries:

EntityList[%]

Get a list of all chemicals that are alcohols:

EntityList[(EntityClass["alcohols", EntityClass["Chemical","Alcohols"], "EntityClass[\"Chemical\", \"Alcohols\"]", "chemicals"])]//Shallow

Get the population of all G7 countries:

EntityValue[EntityClass["Country","GroupOf7"],"Population"]

A list of available entity classes can be found with (RefLink[EntityClassList, paclet:ref/EntityClassList]):

EntityClassList["MinorPlanet"]

EntityValue[(EntityClass["inner main belt asteroids", EntityClass["MinorPlanet","InnerMainBeltAsteroid"], "EntityClass[\"MinorPlanet\", \"InnerMainBeltAsteroid\"]", "minor planets"]),"EntityCount"]

Create an implicitly defined entity class consisting of all elements whose densities fall within a specified range:

EntityClass["Element",{"Density" ->Quantity[ Interval[{5, 8}], "Grams"/"Centimeters"^3]}]

Explicitly list the elements:

EntityList[%]

Use an implicitly defined entity class to select the countries with the world's 10 longest borders and return them together with their corresponding border lengths:

EntityValue[EntityClass["Country",{(EntityProperty["full boundary length", EntityProperty["Country","BoundaryLength"], "EntityProperty[\"Country\", \"BoundaryLength\"]"])->TakeLargest[10]}],(EntityProperty["full boundary length", EntityProperty["Country","BoundaryLength"], "EntityProperty[\"Country\", \"BoundaryLength\"]"]),"EntityAssociation"]

OpenersExampleSection1(Spacer1)Scope  (6)

An implicitly defined entity class may be specified using any number of property values:

EntityClass["Aircraft", {"CruiseSpeed" -> Quantity[Interval[{550, 600}], "Miles"/"Hours"],
"Height" -> Quantity[Interval[{75, 200}], "Feet"],
"Wingspan" -> Quantity[Interval[{75, 80}], "Meters"]
}]

Return a list of aircraft satisfying the above criteria:

EntityList[%]

List the entities that simultaneously satisfy a combination of largest and smallest ordinal conditions together with an explicit property value:

EntityClass["Polyhedron",{"FaceCount"->TakeLargest[95],"EdgeCount"->TakeSmallest[95],"VertexCount"->14}]["Entities"]

List the largest three countries in the Group of 8 by population:

EntityList[EntityClass[EntityClass["Country", "G8"], "Population" -> TakeLargest[3]]]

Get information about an (RefLink[EntityClass, paclet:ref/EntityClass]):

Information[(EntityClass["noble gases", EntityClass["Element","NobleGas"], "EntityClass[\"Element\", \"NobleGas\"]", "elements"])]

Calculate the mean and standard deviation of the maximum weight for all dog breeds specified by a minimal male height:

EntityValue[EntityClass["DogBreed",{(EntityProperty["male minimum height", EntityProperty["DogBreed","HeightMaleMinimum"], "EntityProperty[\"DogBreed\", \"HeightMaleMinimum\"]"])-> Quantity[Interval[{15,18}], "Inches"]}],
(EntityProperty["male maximum weight", EntityProperty["DogBreed","WeightMaleMaximum"], "EntityProperty[\"DogBreed\", \"WeightMaleMaximum\"]"]),#]& /@ {Mean,StandardDeviation}

Construct an implicitly defined entity class consisting of movies featuring Angelina Jolie:

ajmovies=EntityClass["Movie",{EntityProperty["Movie","Cast"]->(Entity["Angelina Jolie", Entity["Person","AngelinaJolie::8cggf"], "Entity[\"Person\", \"AngelinaJolie::8cggf\"]", "person"])}]

Retrieve titles, release dates, and posters for these films:

(ajmoviedata=Values[DeleteMissing[EntityValue[ajmovies,{(EntityProperty["title", EntityProperty["Movie","Name"], "EntityProperty[\"Movie\", \"Name\"]"]),(EntityProperty["release date", EntityProperty["Movie","ReleaseDate"], "EntityProperty[\"Movie\", \"ReleaseDate\"]"]),(EntityProperty["image", EntityProperty["Movie","Image"], "EntityProperty[\"Movie\", \"Image\"]"])},"EntityAssociation"],1,2]])//Short

Make a timeline illustrating when these movies were released:

TimelinePlot[Labeled[#2,Tooltip[#3,Column[{#1,#2}]]]&@@@ ajmoviedata,PlotLayout->"ReverseVertical"]

OpenersExampleSection3(Spacer1)Properties & Relations  (2)

Get information about an (RefLink[EntityClass, paclet:ref/EntityClass]):

Get the three largest continents by population:

EntityClass[AggregatedEntityClass["Country", "Population" -> Total, "Continent"], "Population" -> TakeLargest[3]][{"Continent", "Population"}]

OpenersExampleSection4(Spacer1)Possible Issues  (1)

Implicit entity classes may contain no entities:

EntityClass["Building",{"FloorCount"->Interval[{500,600}]}]

EntityList[%]

Verify that the largest floor counts in the world are (much) smaller than even the lower endpoint of the interval specified above:

EntityValue[EntityClass["Building",{"FloorCount"->TakeLargest[5]}],"FloorCount","EntityAssociation"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[EntityList, paclet:ref/EntityList])  ▪  (RefLink[EntityValue, paclet:ref/EntityValue])  ▪  (RefLink[EntityClassList, paclet:ref/EntityClassList])  ▪  (RefLink[CanonicalName, paclet:ref/CanonicalName])  ▪  (RefLink[CommonName, paclet:ref/CommonName])  ▪  (RefLink[EntityPropertyClass, paclet:ref/EntityPropertyClass])  ▪  (RefLink[FilteredEntityClass, paclet:ref/FilteredEntityClass])  ▪  (RefLink[SortedEntityClass, paclet:ref/SortedEntityClass])  ▪  (RefLink[AggregatedEntityClass, paclet:ref/AggregatedEntityClass])  ▪  (RefLink[CombinedEntityClass, paclet:ref/CombinedEntityClass])  ▪  (RefLink[ExtendedEntityClass, paclet:ref/ExtendedEntityClass])  ▪  (RefLink[SampledEntityClass, paclet:ref/SampledEntityClass])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Database Connectivity, paclet:guide/DatabaseConnectivity])}, {▪(RefLinkPlain[WDF (Wolfram Data Framework), paclet:guide/WDFWolframDataFramework])}, {▪(RefLinkPlain[Working with Information in Relational Databases, paclet:guide/WorkingWithRelationalDatabases])}, {▪(RefLinkPlain[Knowledge Representation & Access, paclet:guide/KnowledgeRepresentationAndAccess])}, {▪(RefLinkPlain[Engineering Data, paclet:guide/EngineeringData])}, {▪(RefLinkPlain[Life Sciences & Medicine: Data & Computation, paclet:guide/LifeSciencesAndMedicineDataAndComputation])}, {▪(RefLinkPlain[Cultural Data, paclet:guide/CulturalData])}, {▪(RefLinkPlain[People & History, paclet:guide/PeopleAndHistory])}, {▪(RefLinkPlain[Transportation Data, paclet:guide/TransportationData])}, {▪(RefLinkPlain[Geographic Data & Entities, paclet:guide/GeographicData])}, {▪(RefLinkPlain[Astronomical Computation & Data, paclet:guide/AstronomicalComputationAndData])}, {▪(RefLinkPlain[Physics & Chemistry: Data and Computation, paclet:guide/PhysicsAndChemistryDataAndComputation])}, {▪(RefLinkPlain[Internet and Computer Systems Data, paclet:guide/InternetAndWebRelatedData])}})}})