mimic-code icon indicating copy to clipboard operation
mimic-code copied to clipboard

Built-in download of data

Open jeblundell opened this issue 10 years ago • 4 comments

Once #103 is finalised, something that I think is worth incorporating is download of data from PhysioNetWorks. Reason I suggest we wait for that to be merged is so we can just do it as a build target.

On PNW there's an automated download command: wget --user YOURUSERNAME --ask-password -A csv.gz -m -p -E -k -K -np http://MIMICURL

We can literally just indent that and put data: before it and then we can do "make data" to get the data. I'd suggest we also include variables for where to store the data and (obviously) the username. An alternative approach is to include each csv.gz as a build target.

I'd suggest also throwing in "make verify" or modifying mimic-check to run the MD5 checksums.

Two issues: (1) Is it alright to actually include the URL itself? I can't really see why not as it's protected with username/password, but thought I'd check anyway (2) Again, we run into the cross-platform issue. Given that @alistairewj was pondering including a gzip binary, might be worth considering including a wget binary too for this reason. I forget whether OS X comes with it as standard. I suppose an objection is that we're creeping various binaries into this, which is not ideal. Maybe a better approach is to only including wget or curl and download gzip etc. from official sources.

jeblundell avatar Jul 10 '16 12:07 jeblundell

I added a basic recipe for downloading MIMIC-III from PhysioNet with two variables - physionetuser and datadir.

I didn't do anything with the checksums or look into support for non-unix systems, so I'm leaving this issue open in case we want to deal with these things later.

tompollard avatar Sep 15 '16 17:09 tompollard

Will this issue be resolved soon? I think I have a related problem. After running make help, I'm having trouble setting make mimic datadir=~/my/path/to/data/. I keep getting the response Unable to find ~/my/path/to/data/ADMISSIONS.csv - exiting before build.

HelloAnneKim avatar Jun 19 '17 19:06 HelloAnneKim

On physionet, there's no ADMISSIONS.csv, but there is a admissiondrug.csv and admissionDx.csv

HelloAnneKim avatar Jun 19 '17 19:06 HelloAnneKim

@herroannekim there are several projects on PhysioNet, so please could you explain which project you are looking at? (e.g. provide the URL).

tompollard avatar Jun 19 '17 20:06 tompollard