Function Repository Resource:

WolframKnowledgebaseExplorer

Source Notebook

Explore the Wolfram Knowledgebase via a graphical user interface

Contributed by: Jeremy Stratton-Smith (Wolfram|Alpha Math Team)

ResourceFunction["WolframKnowledgebaseExplorer"][domain]

produces a graphical user interface for building queries about the data in domain using the Entity framework.

ResourceFunction["WolframKnowledgebaseExplorer"][]

produces a graphical user interface for building queries using the Entity framework, allowing you to pick a domain.

ResourceFunction["WolframKnowledgebaseExplorer"]["Domains"]

returns the list of currently supported domains.

Details

The list of domains supported by the WolframKnowledgebaseExplorer is expanding actively.
The domain exploration interface is broken into six sections: Entity selection, Properties, Global property qualifiers, Specific property qualifiers, Entity sorting and the buttons to produce outputs.
Entity selectionrestrict the output of entities for which data will be displayed
Propertiesselect which properties to look up for the given entities
Global property qualifiersset one or more global qualifiers on the data to be looked up
Specific property qualifiersset one or more qualifiers for a specific selected property
Entity sortingchoose how to sort the entities that are output
Buttonschoose what kind of output you want
It is possible to query for data that may not be available for a given qualifier (e.g. the population of a country at a date that predates the country's formation).

Examples

Basic Examples (8) 

Call WolframKnowledgebaseExplorer on a domain to open the interface:

In[1]:=
ResourceFunction["WolframKnowledgebaseExplorer"]["Planet"]
Out[1]=

Now select "distance from Earth" and move the right hand slider to be close to 4 astronomical units. Then click "Generate implicit EntityClass" to see which entities have been selected with these settings:

Out[2]=
In[3]:=
EntityList[
 EntityClass[
  "Planet", {EntityProperty[
    "Planet", "DistanceFromEarth", {"Date" -> DateObject[{2023, 8, 16, 14, 12, 6.894117}, "Instant", "Gregorian", -5.]}] -> Quantity[Interval[{0, 4.030000000000001}], "AstronomicalUnit"]}]]
Out[3]=

Clicking any of the buttons under "Properties" will open a separate window to select which properties to view data for:

Selecting a few properties of interest gives:

Clicking on the "Print EntityValue call" button prints out a cell with the EntityValue call representing the state of the interface taking default values for the various qualifiers, in this case, date and location. This can be evaluated manually to get an entity-property association:

Clicking on the "Generate dataset" button prints out a cell with the EntityValue call representing the state of the interface and evaluates it to get a Dataset:

In[4]:=
EntityValue[
 EntityClass[
  "Planet", {EntityProperty[
    "Planet", "DistanceFromEarth", {"Date" -> DateObject[{2023, 8, 24, 8, 34, 48.045532}, "Instant", "Gregorian", -5.]}] -> Quantity[Interval[{0, 4.030000000000001}], "AstronomicalUnit"]}], {EntityProperty["Planet", "Mass"], EntityProperty[
  "Planet", "DistanceFromEarth", {"Date" -> DateObject[{2023, 8, 24, 8, 34, 48.045532}, "Instant", "Gregorian", -5.]}], EntityProperty[
  "Planet", "Constellation", {"Date" -> DateObject[{2023, 8, 24, 8, 34, 48.045532}, "Instant", "Gregorian", -5.]}], EntityProperty["Planet", "Name"]}, "Dataset"]
Out[4]=

To change values such as "Date" or "Location" which impact the data to be viewed, use the qualifiers sections. Change the global date qualifier to January 1, 1900:

Data for some properties changes with qualifier values:

In[5]:=
EntityValue[
 EntityClass[
  "Planet", {EntityProperty[
    "Planet", "DistanceFromEarth", {"Date" -> DateObject[{1900, 1, 1, 8, 34, 48.04553747177124}, "Instant", "Gregorian", -5.]}] -> Quantity[Interval[{0, 4.030000000000001}], "AstronomicalUnit"]}], {EntityProperty["Planet", "Mass"], EntityProperty[
  "Planet", "DistanceFromEarth", {"Date" -> DateObject[{1900, 1, 1, 8, 34, 48.04553747177124}, "Instant", "Gregorian", -5.]}], EntityProperty[
  "Planet", "Constellation", {"Date" -> DateObject[{1900, 1, 1, 8, 34, 48.04553747177124}, "Instant", "Gregorian", -5.]}], EntityProperty["Planet", "Name"]}, "Dataset"]
Out[5]=

Scope (2) 

Get the list of domains available to WolframKnowledgebaseExplorer:

In[6]:=
ResourceFunction["WolframKnowledgebaseExplorer"]["Domains"]
Out[6]=

Call WolframKnowledgebaseExplorer without a domain to open an interface that allows you to pick which domain to explore:

In[7]:=
ResourceFunction["WolframKnowledgebaseExplorer"][]
Out[7]=

Publisher

Wolfram|Alpha Math Team

Requirements

Wolfram Language 13.0 (December 2021) or above

Version History

  • 1.0.0 – 24 August 2023

Related Resources

Author Notes

To view the full source code for WolframKnowledgebaseExplorer, evaluate the following:

License Information