Drive or Walk?
Decide whether to drive or walk when going from one museum to another in New York.
In[1]:=
museums = {Entity["Museum", "MuseumOfModernArt::nfkn8"],
Entity["Museum", "AmericanMuseumOfNaturalHistory::gf4kv"]};
Compute travel directions between those two locations, both driving and walking.
In[2]:=
drive = TravelDirections[museums, TravelMethod -> "Driving"]
Out[2]=
In[3]:=
walk = TravelDirections[museums, TravelMethod -> "Walking"]
Out[3]=
Compare both paths.
In[4]:=
GeoGraphics[{GeoMarker[museums], Thick, Red, GeoPath[drive], Blue,
GeoPath[walk]}, GeoRange -> Quantity[1, "Mile"]]
Out[4]=
The nice walk through Central Park is shorter, but takes longer.
In[5]:=
{walk["TravelDistance"], walk["TravelTime"]}
Out[5]=
In[6]:=
{drive["TravelDistance"], drive["TravelTime"]}
Out[6]=