Internet Code Map

Make maps showing countries internet codes.

Run the code to get a list of countries and their internet codes:

SHOW/HIDE DETAILS

Get a natural language input box by typing +=. Type all countries into the box and run the code with +. The result is an Entity that represents all of the worlds countries:

In[1]:=
X
Out[1]=

This gives the list of all the properties known about the countries:

In[2]:=
X
Out[2]=

Use EntityValue to get the value of a particular property for all countries:

In[3]:=
X
Out[3]=

If you mouse over a property like , youll see the property name, which you can use in place of the property itself:

In[4]:=
X
Out[4]=

Entity gives a list of the individual country entities:

In[5]:=
X
Out[5]=

Get both the country entities and their internet codes:

In[6]:=
X
Out[6]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Make a map of all the countries. Try different colors and sizes:

Note: run the code in the previous step first.

SHOW/HIDE DETAILS

The first country in the countrycodes list is the United States:

In[1]:=
X
Out[1]=

This gives just the country entity:

In[2]:=
X
Out[2]=

This makes a map showing the United States country polygon in gray:

In[3]:=
X
Out[3]=

Use EdgeForm and FaceForm to make the polygon white with a black outline (and put the contents of the graphic in a list, indicated by the curly brackets):

In[4]:=
X
Out[4]=

Make a map of all of the worlds countries:

In[5]:=
X
Out[5]=

Increase the size of the map to 800 pixels:

In[6]:=
X
Out[6]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Label the countries with their internet codes:

SHOW/HIDE DETAILS

Use GeoMarker to label the United States polygon with its internet code (the code is very small and red, near the center of the United States):

In[1]:=
X
Out[1]=

Turn the GeoMarker expression into a pure function so that it can be applied to the entire list of countries. This expression does the same thing as the previous one:

In[2]:=
X
Out[2]=

Make a map of all countries and their internet codes:

In[3]:=
X
Out[3]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Zoom in on part of the map. Try other regions, like southern europe or oceania:

SHOW/HIDE DETAILS

Internet codes in some parts of the map are so crowded that theyre hard to read. You can zoom in on part of the map with GeoRange. Use a natural language input box to specify a region:

In[1]:=
X
Out[1]=

HIDE DETAILS
In[1]:=
X
Out[1]=