Skip to content

Appendix 1

Erin Polka edited this page Jun 16, 2021 · 6 revisions

WIP

How to copy a file source pathway from an image file into excel

On a PC

  • Right-click on your image file. Click on "properties". Under the "General" tab, identify the "Location:" line. The line of text on that line is your file source pathway. Highlight the whole length of the file source pathway (left-click and drag across),copy the text (either right-click, "copy"; or "ctrl-c"), and paste the file source pathway into the "Image path" column of the "image_data" sheet on the row corresponding to the participant.
  • Click on the link for a more in-depth explanation of what a file pathway is, and another way to copy the source pathway: https://www.timeatlas.com/copy-file-path/

On a MAC

How to auto-populate pathway rows in excel

Instead of copying and pasting each file source pathway into individual rows of the master Excel file, Excel code can expedite the process by auto-populating the rows with text. This is especially useful when there are many image file source pathways that need inserting into the master Excel file.

When only a single image is needed per participant ID

  • Before inserting the file source pathways, be sure to save the image files with similar file-type names and use each image’s corresponding participant id as a unique identifier for each file (eg: NO2_winteraverage_PID1, NO2_winteraverage_PID2…).
  • Open the master Excel file and click on the "image_data" tab. Be sure your participant ids are filled out under the "ID" column.
  • Open the folder that houses your individualized images. (If images are saved in multiple folders, steps XX - XX will be repeated as many times are there are unique folders).
  • Copy the file source pathway for the first participant id listed in the "image_data" tab (eg: if the first participant id is "PID1", then copy PID1's first image from the image folder).
  • Find the "Image Path" column header and locate the cell that corresponds to the participant id row of the copied image. Double click the cell. Type the equals (=) sign, followed by two quotation marks ("") to look like: =""
  • Click in between the quotation marks, and paste the file source pathway (e.g., ="C:\Users\polkaen\Desktop\HOME Report Back\GitHub\img\p01_fig1.png"
  • One the file source pathway has been entered, go back into the cell and delete the participant id in the pathway. Replace it with two quotation marks (") encasing two ampersand (&) signs (ie: "&&"). Click in between the ampersand signs, and then click on the cell with the participant id (or type the cell location). It might look something like this: "&A2&". The pathway code is not complete. Press the "Enter" key to exit the cell code. The final file pathway might look something like this: ="C:\Users\polkaen\Desktop\HOME Report Back\GitHub\img"&A2&".png".
  • Click the bottom-right corner of the cell to drag it down and auto-populate remaining cells. Excel will now auto-populate file source pathways with each corresponding row's participant id.

When multiple images are needed per participant ID

  • TBD