MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Offline use of Paclets

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103492] Re: Offline use of Paclets
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Fri, 25 Sep 2009 05:56:17 -0400 (EDT)
  • References: <h9e6hn$42d$1@smc.vnet.net>

A. B. wrote:
> Hello, David,
> 
> Could you please expand on the last bit. How did you 'Save' the data once
> downloaded ?
> 
>> Alexey wrote:
>>> Hi,
>>> Is there a way to force Mathematica 7 to load full set of paclets for
>>> further offline use? If I know that some time I will not have access
>>> to Internet but I will need use paclet data (e.g. GraphData[]), what
>>> command I should use for loading ALL paclet-files associated with
>>> GraphData[] and storing them offline? It there universal way for any
>>> type of such data (GraphData[], KnotData[], LatticeData[] etc.)?
>>>
>> There does not seem to be a totally satisfactory solution to this, in
>> that it would seem that if Mathematica thinks there is an internet
>> connection, it will try to refresh the data, and generate errors if the
>> connection is weak or drops part way through the update. This can be
>> particularly troublesome while giving a presentation!
>>
>> I solved this by loading all the data I required, and storing it
>> separately using Save.
>>
>> David Bailey
>> http://www.dbaileyconsultancy.co.uk
>>
> 
> 


Well the exact details obviously depend on what data you need. Here is 
some code that extracts the country data needed for a particular 
program. I created two variables and a function containing the data and 
then saved the result away using DumpSave (I could have used Save, but 
binary files are faster for bulky data sets).

AllCountries=CountryData[];
AllPolygonData=CountryData[#,{"Polygon","Equirectangular"}]&/@AllCountries;
Map[(CountryPolygonData[Evaluate[#]]=CountryData[#,"Polygon"])&,AllCountries];
DumpSave["saveddata.mx",{AllCountries,AllPolygonData,CountryPolygonData}];

Read the data back using Get, and Mathematica will never go and 
interrogate the internet.

David Bailey
http://www.dbaileyconsultancy.co.uk




  • Prev by Date: Re: protecting Mathematica notebooks/source code from piracy
  • Next by Date: Re: OneIdentity
  • Previous by thread: Re: Offline use of Paclets
  • Next by thread: Re: Re: Offline use of Paclets