EntityValue

Listing of Entity Types »

EntityValue[entity,property]

gives the value of the specified property for the given entity.

EntityValue[{entity1,entity2,},property]

gives the list of values of the specified property for each of the entityi.

EntityValue[class,property]

gives the list of values of the specified property for all entities in the specified class.

EntityValue[entity,{property1,property2,}]

gives the list of values of the propertyi for the specified entity.

EntityValue[ents,{property1,property2,}]

gives the list of values of the propertyi for each of the entities represented by ents.

Details

  • ent[property] is equivalent to EntityValue[ent,property] when ent is a valid entity or entity class construct.
  • property[ent] is equivalent to EntityValue[ent,property] when property is a valid EntityProperty, EntityPropertyClass or EntityFunction.
  • A property is specified either by a standard name string or by EntityProperty[type,name,options], where the options can include property qualifiers.
  • In EntityValue[ent,property], the following forms for ent can be used:
  • Entity[]a single entity
    EntityClass[]a named or implicit entity class
    SortedEntityClass[]a class sorted by one or more properties
    SampledEntityClass[]a class containing only the first few entities
    FilteredEntityClass[]a class filtered by a predicate
    ExtendedEntityClass[]a class with one or more properties added
    AggregatedEntityClass[]a class obtained by aggregating over one or more properties
    CombinedEntityClass[]a class obtained by combining the properties of two classes
    {Entity[],Entity[],}a list of individual entities
    "type"all entities of the specified type
  • In EntityValue[ent,prop], prop can be any of the following:
  • "name"named property for the entity type given
    EntityProperty[type,"name"]fully qualified property
    EntityFunction[]a computed property
    EntityPropertyClass[]a named class of properties
    {EntityProperty[], }a list of properties
  • Certain properties are available generically for an entity type, so an entity argument of form Entity["type"] or just "type" can be used:
  • "Properties"the list of available properties
    "SampleEntities"a sample list of available entities (typically of length 10)
    "SampleEntityClasses"a sample list of available entity classes (typically of length 10)
    "EntityCount"number of entities available
    "Entities"the list of available entities
    "EntityClasses"the list of available entity classes
    "PropertyClasses"the list of available property classes
    "PropertyCount"number of properties available
  • The following modifiers can be used in EntityValue[entity,property,"modifier"]:
  • "EntityAssociation"an association of entities and entity-property values
    "PropertyAssociation"an association of properties and entity-property values
    "EntityPropertyAssociation"an association in which the specified entities are keys, and values are a nested association of properties and entity-property values
    "PropertyEntityAssociation"an association in which the specified properties are keys, and values are a nested association of entities and entity-property values
    "Dataset"a dataset in which the specified entities are keys, and values are an association of property names and entity-property values
    "Association"a nested association with entity keys on the first level and property keys on the second level
    "NonMissingPropertyAssociation"an association of properties and entity-property values with the missing values dropped
    "NonMissingEntityAssociation"an association of entities and entity-property values with the missing values dropped
  • The short form EntityValue[entity,"modifier"] is equivalent to EntityValue[entity,EntityProperties[entity],"modifier"].
  • The following annotations can be used in EntityValue[entity,property,"annotation"]:
  • "Source"source information associated with the entity-property value
    "Date"the date associated with the entity-property value
  • EntityValue[EntityProperty[],"property"] can be used to lookup up property metadata. Metadata properties include the following:
  • "Qualifiers"the list of possible qualifiers for the property
    "QualifierValues"the list of possible values that can be given to each qualifier
    "Label"the label of the property
    "Definition"a detailed textual definition of the property
    "Source"source information for the property
    "PhysicalQuantity"the physical quantity associated with entity-property values
    "Unit"the common unit associated with entity-property values
  • A qualifier value of Automatic indicates that an applicable format of values can be used, e.g. for the "Date" qualifier; this includes a proper date or date span.
  • EntityValue caches results between sessions when able.
  • EntityValue fetches related knowledgebase data in the background based on previously requested data.
  • EntityValue[] returns a list of all available entity types.

Examples

open all close all

Basic Examples  (5)

Get the property "LongestSpan" of the bridge entity "GoldenGate":

In[1]:=
Click for copyable input
Out[1]=

Use to discover names of entities and properties:

In[1]:=
Click for copyable input
Out[1]=

Find out how many entities are available in a given type:

In[1]:=
Click for copyable input
Out[1]=

Extract properties from an EntityClass:

In[1]:=
Click for copyable input
Out[1]=

Use EntityValue to query an external database:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (17)

Properties & Relations  (4)

Possible Issues  (1)

Introduced in 2014
(10.0)
|
Updated in 2018
(11.3)