How do I download files?

Researchers may desire to download files from their notebooks to their local environments for sharing and publishing purposes. Keep in mind, researchers are to only download summary statistics and figures that abide by our Data Dissemination Policy. 

The first step is to save your data or figure as a file to your Standard Disk. Different types of files utilize different types of saving commands when using R or Python. For R, here are some great cheat sheets that contain saving commands. For Python, here is a resource for saving different figures.

As an example to save a figure as a .png file in R, you can use the following command:

library(tidyverse)

ggsave(“filename.png”) 

To save a .png file in Python you can use:

from __future__ import print_function, division
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
%matplotlib inline

plt.savefig(“filename.png”) 

Below is another example, to save a .csv file in R you can use:

library(tidyverse)

write_excel_csv(name of your dataframe, "filename")

Or in Python:

your_dataframe.to_csv("filename")

These commands will create a file that will be temporarily stored in your current Standard Disk.  To export / download the file, click “Files” and then click on “Open”.  Check the box next to the file you just created and wish to download, and then click on “Download” to save it into your computer.

 

PNG.png

 

Please remember that all downloads and dissemination of data must comply with the Data User Code of Conduct and the Data and Statistics Dissemination Policy.

You are prohibited from taking screenshots or attempting in any way to remove participant-level data from the workbench. You are also prohibited from publishing or otherwise distributing any data or aggregate statistics corresponding to fewer than 20 participants unless expressly permitted by the Data and Statistics Dissemination Policy.

 

Please review our Data User Code of Conduct and Egress Alert Policy for further information.

 

Was this article helpful?

2 out of 2 found this helpful

Have more questions? Submit a request