Get access to all lessons in this course.
- Welcome to Reproducibility for the Rest of Us
- Reproducibility for the Rest of Us Course Logistics
- Using Space Wisely
- Naming All the Things
- Using Function Arguments
- Prologs & Annotation
- Using Seed Values
- Writing Functions for Repeated Tasks
- Literate Programming with Quarto
- Embedding Files to Improve Reproducibility
- Managing Project Files for Reproducibility
Reproducibility for the Rest of Us
Embedding Files to Improve Reproducibility
This lesson is locked
This lesson is called Embedding Files to Improve Reproducibility, part of the Reproducibility for the Rest of Us course. This lesson is called Embedding Files to Improve Reproducibility, part of the Reproducibility for the Rest of Us course.
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
You need to be signed-in to comment on this post. Login.
Emma Spielfogel
October 18, 2023
Do you have any suggestions for implementing embedding for circumstances where the data are too sensitive to be shared outside a specific group of people (e.g. health data)? Could this be set up in such a way that only people with permissions to access that directory can download the data, or are there other possible implementations?
Jenine Harris
October 20, 2023
What a great question! I have never tried to do this and the help documentation for the embed_files() function does not describe this sort of functionality. I would guess that, if the data file itself contains password protection (like an Excel file with a password), this protection will exist when the file is downloaded. I have posted a question to the package developer page here if you want to follow it: https://yihui.org/en/2018/07/embed-file/
Other options could be pointing people to a private GitHub repository where your code and data are stored with password protection and creating a synthetic version of your data that can be publicly shared.
Thanks for the question!
Jenine Harris
October 20, 2023
The package author wrote back: "Password protection is likely to be meaningless to people who understand HTML and base64 encoding, because the file is embedded in HTML as a base64 string. As long as you give them the HTML page, they will have access to this string, and they can easily decode it by themselves without clicking on the link. If you want to password protect a file, I'd recommend encrypting it before embedding it. Then people can download and decrypt it using the password you told them.
That said, it's certainly possible to prompt a password input---it just won't really protect your file, and people can easily work around it."
...so it sounds like password protecting your individual data file is the best way to go. If you want to ask him how to add a password to the link, you can continue the conversation here: https://yihui.org/en/2018/07/embed-file/