Researchers increasingly use the Open Science Framework (OSF) to share files, such as data and code underlying scientific publications, or presentations and materials for scientific workshops. The OSF is an amazing service that has contributed immensely to a changed research culture where psychologists share data, code, and materials. We are very grateful it exists.
But it is
not always the most user-friendly. Specifically, downloading files from the OSF
is a bigger hassle than we (Lisa DeBruine
and Daniel
Lakens, the developers of Papercheck) would like it to be. Downloading individual
files is so complex, Malte Elson
recently posted this meme on Bluesky.
Not only is
the download button for files difficult to find, but downloading all files
related to a project can be surprisingly effortful. It is possible to download
all files in a zip folder that will be called ‘osfstorage-archive.zip’ when
downloaded. But as the OSF supports a nested folder structure, you might miss a
folder, and you will quickly end up with ‘osfstorage-archive (1).zip’, ‘osfstorage-archive
(2).zip’, etc. Unzipping these archives creates a lot of files without the
organized folder structure, in folders with meaningless names, making it
difficult to understand where files are.
The osf_file_download function in Papercheck
We have added a new function to our R package ‘Papercheck’ that will download all files and folders in an OSF repository. It saves all files by recreating the folder structure from the OSF in your download folder. Just install Papercheck, load the library, and use the osf_file_download function to grab all files on the OSF:
library(papercheck)
osf_file_download("6nt4v")
All files
will be downloaded to your working directory.
Are you feeling
FOMO for missing out on the King Open
Research Summer School that is going on these days, where Sajedeh Rasti talked
about Preregistration, and Cristian
Mesquida will give a workshop on using Papercheck? Well, at least it is
very easy to download all the files they have shared on the OSF and look at the
presentations:
osf_file_download("b7es8")
In the
output, we see that by default large files (more than 10mb) are omitted.
If you want
to download all files, regardless of the size, then set the parameter to ignore
the maximum file size:
osf_file_download("b7es8",
max_file_size = NULL)
Sometimes
you might want to download all files but ignore the file structure on the OSF,
to just have all the files in one folder. Setting the parameter ignore_folder_structure
= TRUE will give you all the files on the OSF in a single folder. By default, files will be downloaded into your working directory, but you can also specify
where you want the files to be saved.
osf_file_download("6nt4v",
ignore_folder_structure = TRUE, download_to = "C:\\test_download")
We hope
this function will make it easier for reviewers to access all supplementary
files stored on the OSF during peer review, and for researchers who want to re-use
data, code, or materials shared on the OSF by downloading all the files they
need easily. Make sure to install the latest version of Papercheck (0.0.0.9050)
to get access to this new function. Papercheck is still in active development,
so report any bugs on GitHub.
No comments:
Post a Comment