Chapter 2 Set-Up: Files & Folders

In this chapter we will go over some of the things you will need to know to better navigate your computer, and keep your workflow organized. You will find information on the different types of file formats commonly used in research projects. This chapter also covers file organization on computers, and how this affects your workflow.

At the end of this chapter you should be better prepared for keeping your research organized, and ready to begin learning the best practices for data storage and recording.

2.1 System File Management

On your computer you have an OS, which is responsible for saving, storing, naming, and creating back-up versions of your files! How the OS stores and manages these files depends on the operating system you are using!

2.1.1 Windows

The location where all files are stored is called a drive. There are different types of drives, which are refered to using a capital letter and a semi-colon. The most common drives are the C: and D:.

C: is referred to as the C-Drive, and represents the files stored on the computers hard disk drive (HDD). This drive is always there, and means that any file saved here will always be available on your computer. The C: Drive contains many sub-folders, most are used by the system and contain all of the files needed to run applications and the computer itself. It also contains a Users folder, where each user has a folder that they store all of their personal files.

D: is referred to as the D-Drive. Think of the D-Drive as a back-up, as often times it is a secondary form of file storage connected to your computer. If the C-Drive crashes, files stored on the D-Drive are safe! But Beware! Sometimes a D-Drive can represent a CD or DVD. This means that it stores files externally meaning that if the drive is removed, so are the files!

There are other drives, like F:, that refer to USB’s. This form of drive storage is always external and files are inaccessible once the USB is removed.

2.1.2 Mac

Unlike Windows, Mac operating systems do not use Drives. Instead, it uses 1 hierarchical system refered to using /. Essentially, all of the files are stored or backed up in an online cloud, and users will always have access to these files through their account. On the actual operating system, files are organized into a folder system that stems from the root directory \.

MacOS has 4 top level folders for file management: \Applications, \System, \Users, and \Library. Notice the use of the root directory before the folder name.

\Applications folder is where all of the systems apps are stored. This would be Safari, Mail, or any other app you install. They all end up here!

\System is the folder where all of the files for the MacOS operating system itself are stored. You can’t change any of these files, or move anything from here!

\Library is the folder where all of the files used by the applications (apps) on your computer are stored. This folder isn’t meant for personal file storage. Think of the \Applications folder as where Microsoft Word is stored, and the \Library folder as where all of the font files are stored.

\Users is the folder where all personal files get stored. Each user on the operating system has a Home folder within the parent \Users folder. When each user is logged in, their home folder is marked by an icon of a house. There is also a folder called Shared, meaning all users have access to files stored within this folder.

2.1.3 Summary

Although each operating system may differ in their overarching file management systems, the general idea of understanding your file management systems and organization is crucial.

Beyond the main file management (Drives or Root Directory), personal file organization is based on a folder system. In the next section, we will teach you hoe to navigate and organize your personal files!

2.2 File Organization

Every file on your computer is stored in a specific place on the operating system, using the file management systems mentioned above. Again, we will break these down by operating systems.

2.2.1 Windows

Refering back to the previous section, the C: Drive is the root directory on your operating system. Within here, there are many folders, which the majority are needed and used by the system itself. The only folder you need to be concerned with when saving your personal files is the Users folder.

Each user on a Windows operating system, has a Users folder, that they have access to when logged in. There is also a Public folder, where every user has access to the files stored here.

Within each Users folder, there are additional sub-folders used for personal file storage: Pictures, Music, Videos, Documents, Downloads, and Desktop. There are other folders contained here but again, save these for your operating system to use!

This file organization is used across Windows operating systems and is fairly easy to navigate.

It is best practice to organize all of your files into relevant folders within the parent folders contained within your Users folder.

2.2.2 Mac

Refering back to the previous section, personal files are stored within your \Users folder. The main sub-folders are Desktop, Downloads, Documents, Pictures, Movies, and Music.

It is best practice to organize your personal files into additional sub-folders within these parent folders contained within your \Users folder.

This organization structure is the same throughout MacOS operating systems and can easily be transferred or accessed on other devices through the cloud.

2.2.3 Summary

Although operating systems differ, the general ideology of folder organization is the same. Creating sub-folders within your Users parent-folders is called nesting.

Always make sure to check where your files are being saved, and to maintain your file organization. It is easy to get lost, and lose your files.

It is best practice to store all of the files pertaining to your research project, within 1 folder. Again, you can have additional nested folders to help navigate large projects. We will go into more detail as to why this is important in upcoming chapters!

INCLUDE PICTURES FOR EXAMPLES IN THE SECTIONS??

2.3 File Navigation

File organization and management can be overwhelming and quite complicated. We can easily rack up a lot of personal files and folders, and forget where specific files are located. Luckily, there are ways to help navigate the files on our computers.

2.3.1 File Paths

Every single file on our computer is stored in a specific location. Without folders we would need to search through hundreds of files to find the exact one we need, which isn’t convenient and can be time-consuming.

This is why in addition to the file name, the location of the file is often used. This is called the file path. Each nested folder is separated by a /.

Think of the file path as a directory, or where to look to find the actual file.

Here is an example of a potential file path on a Windows operating system:

"C:Users/John/Desktop/Research Project/Data/Research Data.csv"

The file path is everything you need to know to get to the folder where the file is located. In the above example, the file path takes you from the C: Drive down to a specific Data folder. Once you see a file extension (more on this below) you know you are in the location where the file is located.

2.3.2 File Naming

The name you give the files on your computer is important, and is something that is often overlooked. You want to avoid long complicated file names. You also want to avoid using dates in file names, where possible.

Note: Sometimes there are exceptions for using dates (i.e. 1 data file for each year of data collection)

Best practice is to keep it short, sweet, and simple! There shouldn’t be a need for long detailed file names if you are maintaining your file organization. All of the necessary details will be contained within the file path!

Let’s provide an example, to show how using the file path can help us with naming our files:

# Initial - What is the file path and what is the name?
"C:/Users/John/Documents/HonoursThesis2024_FieldData_cleanned_October_2024.csv"

# After Organizational Changes
"C:/Users/John/Documents/HonoursThesis/Data/field_data_clean.csv"

## Let's Try Another Example

# 2 Files Before File Organization
"C:/Users/John/Documents/HonoursThesis2024_2023FieldData.csv"
"C:/Users/John/Desktop/School/Honoursthesis_2024data.csv"

# Now Here is After - See the difference?
"C:/Users/John/Documents/HonoursThesis/Data/field_data_2023.csv"
"C:/Users/John/Documents/HonoursThesis/Data/field_data_2024.csv"

2.3.3 System File Navigation

Each operating system comes with a way to access and find your files, basically your interface to your systems file cabinet. We will cover these separately.

2.3.3.1 Windows

Windows operating systems use File Explorer for file navigation. It is represented by a folder icon!

THERE IS A REALLY GOOD PICTURE IN THE FIRST LINK BELOW THAT HALPS EXPLAIN THIS BETTER, I WANT TO GO OVER THIS SO PEOPLE KNOW EXACTLY WHAT THEY ARE LOOKING AT- SAME AS THE R STUDIO INTERFACE

2.3.3.2 Mac

Mac operating systems use Finder for file navigation.

When you open Finder, it will open the Recents folder by default, these files are not necessarily stored here and can often cause issues with file organization.

To avoid issues, always open files from within their relevant folders. This may be tedious, but it it could save you from missing files down the road.

GO INTO MORE DEPTH FOR FINDER LIKE THE FILE EXPLORER AND RSTUDIO INTERFACE

2.3.4 Summary

Essentially, maintaining organization for your files is important. Sometimes this can be hard and can easioly get away from you, which is why operating systems have a built-in way to help you get back on track!

Remember to keep your research files in 1 place, and try to stay aware of where you are saving and opening files!

2.4 File Types & Extensions

When you are looking at the different files on your computer, you will often notice an extension after the file name. The file extension is always included at the end and lets you know what type of file it is, and generally what software to open it with.

For Example: Word Documents use the file extension .docx, and Excel Workbooks use .xlsx.

Typically, files are only able to be opened using specific software, and will have to be reformatted in order to be used on different software.

Let’s provide some examples of what some common file formats look like

2.4.1 GPX Files

Markdown languages (e.g. GPX files) are typically in HTML formatting, and require some reformatting because it isn’t set up like a spreadsheet that you would normally see in Excel.

Here’s a couple lines of a GPX file to see what it looks like:

<wpt lat="45.062725972384214" lon="-64.175047036260366">
    <ele>19.221661000000001</ele>
    <time>2021-04-01T16:52:09Z</time>
    <name>001</name>
    <sym>Flag, Blue</sym>
    <type>user</type>
    <extensions>
      <gpxx:WaypointExtension>
        <gpxx:DisplayMode>SymbolAndName</gpxx:DisplayMode>
      </gpxx:WaypointExtension>
      <wptx1:WaypointExtension>
        <wptx1:DisplayMode>SymbolAndName</wptx1:DisplayMode>
      </wptx1:WaypointExtension>
      <ctx:CreationTimeExtension>
        <ctx:CreationTime>2021-04-01T16:52:09Z</ctx:CreationTime>
      </ctx:CreationTimeExtension>
    </extensions>

2.4.2 Include more examples

We will talk more in depth about some other file types and software tools in the next chapter

2.5 Chapter Wrap-Up

Switching between operating systems can be challenging, and even after using 1 system for many years you may find yourself confused with where your files are. That’s ok, we can’t become experts overnight, there is a lot to cover!

It is important for you to understand how to navigate through the files on your computer, and to keep them organized. When we dive into the next few chapters, you will understand the importance of file paths, directories, and file naming. Knowing where you are working, where you are looking, and where you are saving are skills that will help you troubleshoot the majority of problems people face when trying to use R!

2.5.1 Chapter Terms & Definitions

Here is a summary of some of the bolded terms used throughout this chapter, refer back to this list whenever you need a refresher!

Drive -

Root Directory -

Operating System -

NEED TO ADD THE TERMS AND GENERAL DEFINITIONS HERE, IF THIS IS SOMETHING WE SHOULD INCLUDE.