Wolfram Language

New Visualization Domains

Plan a Weekend Getaway

Find the largest US cities and their travel distances from Champaign, Illinois.

In[1]:=
Click for copyable input
data = Quiet[Table[{CommonName[city], QuantityMagnitude[ TravelDistance[{Entity[ "City", {"Champaign", "Illinois", "UnitedStates"}], city}]]}, {city, CountryData["UnitedStates", "LargestCities"]}]];

Create a word cloud from the city names paired with their travel distances, and use an inverse scale so that closer cities are more prominent.

In[2]:=
Click for copyable input
data = Cases[data, {_String, _Real}]; WordCloud[data, ImageSize -> 400, ScalingFunctions -> (1/# &), PlotTheme -> "Marketing"]
Out[2]=

Related Examples

de es fr ja ko pt-br ru zh