Chapter 5 Working Offline vs Online

You may have heard the term cloud computing before, and data scientists often talk about working on the cloud. But what exactly is the cloud?

Cloud storage refers to data or document storage on the Internet rather than on your personal computer. If you take pictures using your phone and then they are backed up on iCloud or Google Photos, you are using the cloud. Using the cloud for storage is like having an external hard drive (portable storage device) that you don’t ever see and can’t actually hold in your hands.

Related to this, the term local means that it isn’t on the cloud but instead something stored on your computer or other device.

5.0.1 Cloud computing

Cloud computing involves applications and software that run on shared data centers rather than running on the computer sitting in front of you. For data analysis, cloud computing has changed the way we think about working with data, especially when it comes to large datasets. A data analyst no longer needs to spend thousands of dollars to own high-capacity computers to deal with big data because the personal computer no longer has to do all the heavy lifting. Instead, a network of computers (from Amazon, IBM, or Microsoft among many others) will do the work instead. Your local computer will only need to run the interface software, which is often just your Internet browser. In future lessons we will study cloud-based data applications in more detail.

5.0.2 What are the advantages of using the cloud?

A major advantage of the cloud is the ability to access your files everywhere, even if you don’t have your personal computer with you. Since storage and applications work over the Internet, they can be accessed from any computer with an Internet connection.

An important advantage of cloud storage is that your files are safe even if your computer is lost or damaged. Because your files are not stored on your computer itself, they are safe and available even if your computer is stolen, you spill coffee on your keyboard, or there’s a natural disaster in your area. Moreover, most cloud storage services provide back-up services in case you delete files by mistake. These back-up services allow for accidentally deleted files to be recovered and restored.

An advantage of cloud computing is an increase in computing power over what is available on your local machine. Remote machines that are used for cloud computing are more powerful than your personal computer and can do your data analysis much faster.

Finally, working with the cloud puts the responsibility of maintaining software on the service provider rather than on you. When running software locally on your personal computer, you need to maintain applications by making sure that they still work and are up to date with the most recent versions. You must download and install the newest version of the software yourself or possibly even pay for a newer edition. With the cloud, service providers make sure the software is well-maintained and running optimally.

5.0.3 What are the disadvantages of using the cloud?

Chromebooks are primarily meant to be used with an Internet connection. This is because most of the software you are using is through an Internet browser. So you will want to make sure you have Internet access when you are working on your Chromebook whenever possible.

But sometimes you won’t have access to the Internet. Fortunately, some of the Chromebook Apps and functionality are available offline. You can use these to work when you can’t get an Internet connection. Then your changes will appear online when you reconnect.

The most obvious disadvantage of working on the cloud is that you need an Internet connection to access storage and computing power. You cannot work “offline” away from the Internet. However, with wireless Internet service (wifi) available widely in libraries, coffee shops, and other public places, it’s possible to work on the cloud from almost anywhere!

There are also concerns with the privacy and security of data that is stored remotely. Privacy and security are issues that must be addressed by both providers and users of cloud-based services. Service providers need to ensure that the files stored at their data centers are safe and secure. Users need to take advantage of authentication measures and use strong passwords to ensure that no one can gain access to their account. Most major cloud-based service providers do a good job in securing your data. Specifically, their infrastructure is set up so that you can avoid security issues by being serious about protecting your account access information through your choice of password and by using two-factor authentication for logins. Briefly, two-factor authentication is a way of proving your identity to a service provider in two steps. The first step that is by providing a password. The second step involves using a physical object in your possession, such as a phone, to prove your identity. For example, you may also need to enter a code that is sent to your phone during the login process. This means someone would need both your password and physical possession of your phone to access your account. It is good practice to chose two-factor authentication whenever it is offered by a service provider.

Be careful when connecting to networks! It can be dangerous to connect to unknown or unverified networks. Only connect to networks that you recognize!

5.0.4 Google Drive

As we discussed in a previous section, the Files App shows files both from your Google Drive and in a “Downloads” folder. All the files in your “Downloads” folder are saved directly on your Chromebook and are available even if you aren’t connected to the Internet. But you can also store files on your Google Drive. The advantage of Google Drive is that all your files are stored online. This means they won’t be lost if you lose your Chromebook and will be accessible from any Internet connected computer. However, sometimes when you don’t have access to the Internet you may want to access your files offline.

You can make Google Drive files available offline on your Chromebook. To do so you need to open the Google Drive App on your Chromebook. You can find the Google Drive App by opening the apps using the launcher button and clicking on the Google Drive icon.

To confirm that you are set to work offline open the Google Drive App

Once you have opened Google Drive you can open the Settings in the upper right hand corner.

Open the Google Drive Settings

Then you can confirm that the box is checked next to the “Offline” setting. This means that all of your Google Slides presentations, Google Docs text files, and Google Sheets data files will be available offline. This will use up storage on your Chromebook, but will let you work even when your computer is not connected to the Internet.

Confirm that the setting to work offline is turned on

5.0.5 Example: editing a text file offline

One of the most common things you might want to do when you don’t have Internet access is to write in a text file. You can do this with a number of different apps. But the one we will use most frequently is Google Docs. You will learn more about Google Docs in a future course, but for now we will show you how offline editing works. First, click on the Google Docs icon to open up the Google Docs App. Note you may have to click on the launcher window to find this App if it is not pinned to your shelf. When Google Docs is open you can click on the plus sign to create a new document.

Open Google Docs and create a new document

Now you should add some text by typing in the Google Doc, this text will automatically be saved on the Google Doc online.

Add some text to the Google Doc online

To test offline editing you need to turn off wifi on your computer. You can do that by clicking the avatar picture in the bottom right hand side of the screen to bring up your global options. Then you can click on the wifi connection to open up the wifi options.

Open your wifi options

You can turn off wifi and your Internet connection by clicking the dot at the top of the wifi menu. Now your Chromebook is offline.

Turn off wifi by clicking the dot.

Now you can open the Google Docs App back up by clicking on the Google Docs icon at the bottom of your screen. You can still make edits to the document created while you are offline.

You can still edit the Google Doc offline.

When you are working offline the offline icon will appear next to the file name.

The offline icon appears next to the file name.

When you are editing a file offline you will see that it says “All changes saved offline” at the top of the window next to the file name. This means that changes to your online document won’t happen until you reconnect to the Internet.

Changes are not saved to the file on the Internet until you reconnect.

To see how this works you can open back up the wifi menu and turn the Internet connection back on by again going through the menu opened by clicking on your avatar on the lower right hand side of the screen.

Turn the wifi back on.

Right after you turn the wifi back on you will briefly see that it says “Saving” at the top of the document next to the file name. This means that the changes you have made to the file are being saved from the version on your Chromebook to the version on the Internet.

Changes are saved when you go back online.

In a similar way you can also edit presentations and spreadsheets offline using Google Slides and Google Sheets. We will cover those Apps more in a separate course. One thing that is worth noting is that if you work with files offline, then the version you change will update the version of the file online. So if you have shared a document with someone else, when you edit that document offline and re-connect, it might write over some of their changes to the file.

5.0.6 Offline Apps

In addition to the main apps from Google, many other apps and extensions offer Offline functionality. Some will be fully functional when they are offline and some will only partially work. When you open the Google Web Store you can specifically search for Apps that have offline functionality. But you will need to review each App to figure out what is available when you are online or offline.

You can search for apps that say they have offline functionality.

5.1 Where Are Files Stored?

Chromebooks operate on the basic idea that you will store everything in the cloud. And, this set of courses is designed with this principle in mind. So most files will be stored online and used through your web browser. There is not a lot of room to store files on most Chromebooks, so we will want to store all of your documents, presentations, spreadsheets, and data on Google Drive or Dropbox.

There is local storage on your Chromebook where you can place files. For example, we saw that when you take a screenshot with your Chromebook the file is saved onto your Chromebook directly, not onto the cloud. This can be particularly useful when people send you a file in an email and you want to eventually store it online. You might need to download it first to upload it again to one of the online file storage systems.

5.1.1 Where is the local storage?

Files stored on your Chromebook can be found using the Files App. You can find them by first clicking on the Launcher circle at the bottom left-hand corner of your screen. To see all of the apps available on your Chromebook you will expand the selection from your Launcher by clicking on the ‘^’ (up arrow) symbol on your screen.

Launcher Screen

You can then find the Files App which looks like a blue circle with a white file folder on it. As we discussed in a previous section you can pin this app to your Shelf by clicking with two finders, then moving the cursor over Pin to Shelf and letting go. It is important to pin this app to your shelf since it will be one of the apps you use most regularly.

Pin the Files App to your Shelf.

If you click on the Files App you will see all of the files you have downloaded from the Internet, any screenshots you may have taken, and any other files you have stored locally on your computer.

The Files App shows you all of your files.

These files are all stored in a folder called “Downloads” if you click on the Downloads button you will only see the files that are actually stored on your Chromebook. These files will be available whether you are connected to the Internet or not.

The Downloads folder shows you all of the files on your Chromebook.

One challenge is that most Chromebooks don’t have much space on them to store data and files. You can check how much space is left on your Chromebook by clicking the three dots on the upper right hand side of the Files app.

The Files options lets you see how much storage you have left.

Despite the limitation on local storage you can also store some of your files and data on the cloud. We will talk about different options for this depending on whether you are storing code, data, or other files later. But in general, you have access to all of your files stored on the “cloud” here as well. For example, everything in Google Drive is also available from the Files App. These files aren’t saved to your computer, they are saved on the Internet, so you will need an Internet connection to be able to access them. To see these files click on “Google Drive” on the left hand side of the Files App.

Google Drive files can be accessed from the Files App

If you want to free up space on your Chromebook, one thing that you can do is transfer some of your files from your Downloads folder to your Google Drive. You can do that by clicking on a file in your Downloads folder, holding down, and dragging it to Google Drive. This will upload the file to the cloud.

You can drag files from Download to Google Drive to upload them.

Then if you delete it from your Downloads folder, it will only be stored on the web and will free up space on your Chromebook. To delete a file you can click with two fingers on the file. This will bring up options for different things you can do with the file. If you move your cursor down to delete and let go, you will be asked if you want to delete the file. If you say yes, the file will be permanently deleted from your Chromebook.

Click with two fingers on a file and then move the cursor over delete to rename the file.

You might also find that the names of files aren’t easy to follow. In a later section we will cover file naming for data science. But for now, it is useful to know how to change the name of a file. You start by again clicking with two fingers on the file. Then you can drag the cursor over “Rename” and let go.

Click with two fingers on a file and then move the cursor over delete to delete the file.

This will place your cursor on the file name which will now be editable. If you type in the new name and hit return the file will be renamed.

Type in the new name and hit return, but don’t change the extension.

Usually it is a good idea to leave the file extension the same even if you rename a file. The extension is all of the characters after the period that tells your computer what type of file it is - a code file, a data file, a text file, or something else. For example if your file is named “file.png” then the extension is “.png”. So you might change the file name to something like “new_file.png” but you would want to leave the “.png” at the end.