Would it be possible to provide a facility to upload data, in a similar way that an image can be uploaded?

For example, although small samples of data can be pasted into the question, it could be a useful facility to have a way of uploading a file containing data (with a size limit). I don't know if an equivalent to imgur would work, but this would be a nice alternative to providing a link to an external website (such as a dropbox file in your public folder) as it would be less likely to expire. It would also make the process of learning about statistics more complete for future readers of the question.

Expanding a little more on this idea, say the data can be uploaded to a particular question, and then accessed through a suffix like data.csv:

Question: http://stats.stackexchange.com/questions/20921/

Data Url for Question: http://stats.stackexchange.com/questions/20921/data.csv

A head section of the data (the first 5 lines and column headers) could be shown formatted by the site, similar to the way an image is displayed in browser.

Storing data in this way would be particularly helpful for software programs that are command driven. Users of R for example could type the following to get access to the data referred to in the question:

dataSample <- read.csv("http://stats.stackexchange.com/questions/20921/data.csv")


This could also be a useful function to have for questions on other StackOverflow type sites.

• (+1) Nice idea! – whuber Jan 11 '12 at 13:43
• excellent idea +1 – Seth Rogers Jan 12 '12 at 18:24

There are a lot of other sites that specialize in hosting files (DropBox, MediaFire, FileFactory to name a few...) that we support linking to. We have never been in the business of hosting files ourselves due to the plethora of free services already available for this.

• I realize that there are many other sites that provide this service, but there is no guarantee of long-term hosting with these sites (AFAIK). With imgur, the image stays as long as imgur survives. If I link to a file on dropbox and in a few weeks remove the file, the benefit of the question is significantly reduced. The other benefit of storing it 'in house' could be to ensure that the data conforms to a specific structure (e.g. csv, rather than something random). – celenius Jan 12 '12 at 21:30
• @celenius - We would offer no such guarantee either! More seriously though, there are virus concerns, an entire infrastructure has to be setup and maintained that doesn't exist now....for little benefit, especially when such hosting services exist. Keep in mind we host nothing now, nothing at all, images are just links - this is a huge time and technology investment on our side....for no real reason, so we won't be doing this. – Nick Craver Jan 12 '12 at 21:48
• @NickCraver I understand that the images are not hosted by SE, but if I remember correctly they are permanently there due to some agreement. Could something similar be developed for file-hosting? In addition a small snippet of the data could be displayed in-browser, read from the hosted file. (Not trying to repeat myself, just clarifying what I mean). – celenius Jan 12 '12 at 21:54
• @celenius - I'm unaware of any service that has such options for us to use...and in any case, the risk of our domain linking to a virus file and being labeled as malware is a huge risk, one not readily recovered from in today's internet (which consist of aggregated blacklists for such things). There are other reasons, this is just one example of very bad things that can happen from doing any file hosting. – Nick Craver Jan 12 '12 at 21:59
• I had not thought about the security concern when I first suggested this; perhaps it could be allayed by only allowing users with a certain reputation access to this functionality. Is checking what files people link to currently, a security concern for the site at the moment? – celenius Jan 12 '12 at 22:09
• @celenius - Files being linked to and files being linked to on a site under our domain are 2 different things, e.g. a file flagged as a virus on our domain can be flagged and propagated, filtering down into people's local antivirus labeling our domain as evil pretty much, this is one of those very bad things :) Unfortunately rep doesn't really mitigate this, especially in the not-intentionally-malicious case. As I mentioned before though, this is one of many issues around hosting, backups, distributed hosting, bandwidth, etc. come readily to mind. – Nick Craver Jan 12 '12 at 22:31
• @NickCraver While StackExchange couldn't guarantee the long-term survival of these files, the threat is considerably less as if SE goes away, the questions go too. This is a considerably different problem than questions littered with broken links to data. – Fomite Jan 28 '12 at 20:53
• @EpiGrad - That's not true :) That's also an argument against this, if SE goes away the questions do not go away. Remember all the content you post here is under the Creative Commons share alike license meaning it belongs to the community not us. Every 2 months or so we provide a data dump from all our non-beta sites via torrent so that the knowledge lives on and can be hosted elsewhere should something happen to us...or just general experiments with the data. If we hosted files, providing every file as part of that data dump would get to be unreasonable very quickly. – Nick Craver Jan 29 '12 at 12:04
• @NickCraver Didn't actually know that. Interesting... – Fomite Jan 29 '12 at 19:24
• @NickCraver I think that you host images. What do you do with them in a data dump? I think that it would be useful even if data uploading was restricted to .csv files (no virus problems) and with a limit of say 1 or 2 meg (about the size of a large image). The existing image infrastructure should be usurpable. One meg would allow 10,000 to 100,000 x,y pairs, which should be more than enough to illuminate a question. – deinst Feb 22 '12 at 2:04

There is significant utility to this feature and I think it merits consideration. The fact that we have not historically allowed hosting data doesn't properly address why this feature shouldn't be looked at. If there are more solid logistical concerns with implementing it, that would make sense; however, leaving data hosting to other sites just because they do it and we don't is not solid.