# Wolfram Mathematica

## Suggest a Museum to Visit

By geo analyzing metadata from a collection of touristic photos, make suggestions about other points of interests in the same area, for example, a museum.

In[1]:=
```files = Map[img \[Function] ExampleData[img, "FilePath"], ExampleData[{"TestImageSet", "Oxford2011"}]]; geopos = Map[file \[Function] Import[file, "GeoPosition"], files];```

Compute the centroid of the locations where pictures were taken.

In[2]:=
```geodata = GeoPosition[{Mean@geopos[[ All, 1, 1]], Mean@geopos[[All, 1, 2]], Mean@Cases[geopos, GeoPosition[{_, _, h_}] :> h]}]```
Out[2]=

Find the closest museum.

In[3]:=
`entMus = Quiet[First@GeoNearest["Museum", geodata]];`
In[4]:=
`geoMus = Quiet[FindGeoLocation@entMus];`

Fetch and typeset information about this museum.

In[5]:=
```mus = EntityValue[entMus, EntityProperty["Museum", "Name"]]; type = EntityValue[entMus, EntityProperty["Museum", "MuseumTypes"]]; about = WikipediaData[mus, "SummaryPlaintext"]; description = TextGrid[{ {Style["MUSEUM TO VISIT", 15], SpanFromLeft}, {Style["Name:", Bold], mus}, {Style["Types:", Bold], StringTake[ToString[type], {2, -2}]}, {Style["About:", Bold], about} }, ItemSize -> {{4, 30}, Automatic}]```
Out[5]=

Visualize this museum's information as a tooltip on a map of the surroundings.

In[6]:=
```tooltip = Tooltip[GeoMarker[geoMus, Entity["Icon", "Museum"]], description];```
In[7]:=
```GeoGraphics[{Thick, Red, GeoDisk[geodata, Quantity[1000, "Meters"]], tooltip}, "GeoRange" -> 1500, ImageSize -> Medium]```
Out[7]=