Function Repository Resource:

WikidataGeoPosition

Source Notebook

Find the geographical coordinates of a place using Wikidata

Contributed by: Peter Burbery

ResourceFunction["WikidataGeoPosition"]["place"]

finds the WGS84 coordinates for a place from Wikidata.

ResourceFunction["WikidataGeoPosition"][ent]

finds the WGS84 coordinates for the Entity ent.

Details

ResourceFunction["WikidataGeoPosition"] can be used for cities, buildings, and other places that have a Wikidata identifier.
Wikidata can be used as an alternative to the Wolfram Data Framework and entities.

Examples

Basic Examples (2) 

Find the position of Huntington, West Virginia:

In[1]:=
ResourceFunction["WikidataGeoPosition"]["Huntington"]
Out[1]=

Make a map:

In[2]:=
GeoGraphics[%, {GeoRange -> Quantity[5, "Kilometers"], GeoBackground -> "VectorBusiness", ImageSize -> Full}]
Out[2]=

Scope (2) 

Find the position of a building:

In[3]:=
GeoGraphics[
 ResourceFunction["WikidataGeoPosition"][
  "Eiffel Tower"], {GeoRange -> Quantity[5, "Kilometers"], GeoBackground -> "VectorBusiness", ImageSize -> Full}]
Out[3]=

Make a map of a famous landmark:

In[4]:=
GeoGraphics[
 ResourceFunction["WikidataGeoPosition"][
  Entity["Building", "StatueOfLiberty::6k253"]], {GeoRange -> Quantity[5, "Kilometers"],
   GeoBackground -> "VectorBusiness", ImageSize -> Full}]
Out[4]=

Applications (1) 

Make a map of the Empire State Building in Manhattan, New York City:

In[5]:=
GeoGraphics[
 ResourceFunction["WikidataGeoPosition"][
  Entity["Building", "EmpireStateBuilding::h583b"]], {GeoRange -> Quantity[
   5, "Kilometers"], GeoBackground -> "VectorBusiness", ImageSize -> Full}]
Out[5]=

Properties and Relations (1) 

Compare the result of WikidataGeoPosition and GeoPosition on an entity:

In[6]:=
{ResourceFunction["WikidataGeoPosition"][
  Entity["Park", "PetrifiedForestNationalPark::4h255"]], GeoPosition[Entity["Park", "PetrifiedForestNationalPark::4h255"]]}
Out[6]=

Publisher

Peter Burbery

Version History

  • 1.0.0 – 12 July 2022

Related Resources

License Information