12

I am going to ask a question on plotting/fitting a lot of data points. It is hard to generate a "fake" data set to illustrate my problem. However, the data points I have are too many for direct pasting into the question. The data is just a long list of coordinates. I have several potential ways to distribute them:

  • Export the data into a text file and upload it to a file hosting service (dropbox, etc). However, Importing the data is not that convenient (data are likely to be converted to strings)

  • Upload a notebook containing the expression

  • Upload a text file containing the whole expression (painful to paste the whole thing).

A major concern is the security problem. In the first case one may have to use ToExpression, and the second case is more obvious.

What is a secure + convenient way to distribute the data points?

11

Before deciding on posting a large dataset, try the followings:

  • Analyze your problematic data some further. It is almost always reducable to a smaller set that still demonstrates the issue - it is of course more work on your behalf. But it also gives you more understanding, and ultimately, pleasure if you could accidentally discover the culprit. Try to test your code with subparts of your large data, like taking a submatrix out of a large matrix.
  • Try whether programmatically generated data also shows the issue: in this case you can reduce your dataset to an implicit form, e.g. to RandomInteger[{0, 1}, {1000, 1000}] or similar.

If a large dataset cannot be streamlined or omitted, there are the following options:

  • Use online file-sharing (as notebooks cannot be attached to posts on SE), e.g. Pastebin (see for example this post or this) or see other sites suggested in the comments here. Please save your data in an easily readable/understandable/importable format.
  • If you really must show a large numerical dataset in the post to make it self-consistent, you might want to respect the visually most pleasing line-width when formatting to code.
  • 2
    +1 simply for the first two bullet points. Every time I see a question containing mountains of data or code, I think to myself: "If you're too lazy to simplify the problem, why should I try it in the first place?" – Niki Estner Aug 3 '16 at 12:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .