MathGroup Archive 2011

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

Search the Archive

Re: Sharing numerical data along with a Mathematica notebook

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118241] Re: Sharing numerical data along with a Mathematica notebook
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Sun, 17 Apr 2011 07:55:31 -0400 (EDT)

Here's a simple strategy:

1. Instruct the users to put the data file in the same directory where 
the notebook is.

2. Include in your notebook (perhaps as an Initialization cell):

    SetDirectory[NotebookDirectory[]]

    You can see for yourself the result of this by evaluting then, say,
    FileNames[] and you'll see the list of files in that directory.

3. Now you can just refer to the data files by name, without any need 
for a path or to search, and do your Import or however you're grabbing 
the data from the file.

On 4/16/2011 7:33 AM, Andrew DeYoung wrote:
> Hi,
>
> I use Mathematica a lot to manipulate large lists of numerical data
> (rather than another system, because I find Mathematica's plot options much
> easier to understand and use).  Often, I like to share my Mathematica
> plots (including the raw data) with others.  I typically send the raw
> data (such as an Excel file or CSV file) and the Mathematica notebook
> with the import commands and the plotted data.  However, this can be a
> little complicated, because then my collaborators have to either make
> sure to put the Excel file in the same directory as the Mathematica
> notebook when they detach it from my email, or I have to put a command
> like:
>
> fileName=SystemDialogInput["FileOpen"]
> Import[fileName]
>
> which allows the user to use the Windows interface to select where on
> their hard drives the Excel file is.  The slight problem with this is
> that the user cannot then simply re-execute the entire notebook (to
> update the plot after changing their parameters) without again using
> the Windows interface to set fileName every time.
>
> Of course, another option is to include the raw data in the same
> Mathematica notebook, but this can lead to large and cluttered
> notebooks.
>
> My question is, is there any better way that I can saving my numerical
> data and sharing it with collaborators?
>
> Thank you,
>
> Andrew DeYoung
> Carnegie Mellon University
>

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: ListLinePlot and Filling, or not ....
  • Next by Date: Re: Another AppendTo replacement problem
  • Previous by thread: Re: Sharing numerical data along with a Mathematica notebook
  • Next by thread: Venn diagrams?