The Wolfram Language’s data functions download data paclets from our data servers. Hence functions such as CityData, WeatherData, and CountryData will not work on computers disconnected from the internet. It is possible to transfer such paclets from an online to an offline machine with the following steps:

  1. Download your paclet of interest (e.g. CityData) to the online machine by evaluating this in the Wolfram Language:
     CityData[All, "Preload"]
  2. Install the paclet by evaluating the following:
     CityData[All, "Install"]
  3. Locate the paclet repository folder by evaluating:
    ToFileName[{$UserBaseDirectory, "Paclets", "Repository"}]

    And identify the subfolders starting with “CityData” in their names.

  4. Copy these folders into the equivalent paclet repository folder on your offline machine. (The corresponding location on the offline computer can be found using the same ToFileName evaluation from above.)

  6. Have the offline Mathematica installation recognize the added data paclets by evaluating :
  7. Finally, evaluate a few examples in the documentation for CityData to verify that the desired data is now available offline in Mathematica.