Chapter 23 Files: Copy, Save, Import, Export, Share

At this point, you have done enough work in CODAP that you probably need to save your files. And if your class did the activity where different groups found the mean heights for males and females of particular ages, and entered them in a spreadsheet, you probably wonder how to get those into CODAP. Finally, if you somehow want to share your work, but don’t want the person you share it with to mess it up, you will be pleased with CODAP’s sharing features.

This chapter, then, is about the mechanics of files in CODAP. The topic sounds decidedly not about content. Largely, that’s correct: it’s just stuff you need to know to make your life easier. Saving files means you do not have to type everything in. Saving means you will not have to start over again every time.

On the other hand, it should carry a whiff of data science. Data science incudes all sorts of technological actions including archiving and storing data. Saving a file may not be a data move— it doesn’t manipulate the data—but it’s essential to the whole process.

Teachers, note: CODAP’s sharing features—described below—are a real boon for preparing a class session. You can set up a CODAP document to be exactly the way you want students to see it. When you share, CODAP essentially takes a snapshot of the file and gives you a URL that you can post. Then, when students go to that link, each student gets their own personal copy of the file to work on.

Similarly, a student can “turn in” a CODAP document by sending you a link to their file; it’s your private copy.

23.1 The hamburger menu

xxx needs graphic

The hamburger menu—three horizontal lines in the upper-left corner of the CODAP screen—has the usual things you would find in a File menu: Open, Save, and so forth.

23.2 Saving a CODAP file

When you choose Save from the hamburger menu to save your CODAP file, you have two main choices: save it as a Google doc, or save it as a local file. Each has its pros and cons.

CODAP’s interface to your Google drive is a bit unorthodox. As of early 2020, the navigation is rudimentary, and there is no search feature. If you are one of us who had trouble remembering where you put your Google docs, you will keep having trouble with Google docs saved by CODAP.

The interface for local files also looks unfamiliar. If you want to save locally, click Local file and then the download button, and that brings up the familiar Save widgetry, where you can name the file and decide what folder to put it in.

23.3 Sharing a CODAP file

The Share… item in the hamburger menu has two sub-items: Get Link to Shared View and Update Shared View.

When you first choose Get Link to Shared View you get a dialog that says “Shared view: disabled” in great big letters. Do not be deterred. A slightly smaller, blue button is marked “Enable sharing.” Press that.

The box changes to say, “Shared view: enabled.” It also presents several other controls and links.

The most important is the small link marked Copy. When you press that, the URL for your shared view is copied to the clipboard.

This link points to a snapshot of your document at this moment. Anyone who presses the link will get a copy of your CODAP document in this exact state.

This is perfect for teachers preparing a lesson. Make your CODAP document exactly the way you want students to see it, then enable sharing and copy the link. Paste the link onto your class web page, and students will be transported to exactly the place you want to start.

Here is a “gotcha”: you enable sharing for your CODAP document, you get the link, you publish it. But your graph, you realize, is in the wrong place. So you move the graph and save your document. Does the link change? Nope. The sharing link points to a snapshot of the document at the moment you enabled sharing.

But that’s what the other item in the Share… menu is for: Update Shared View. In our example, if you choose that after you move the graph, the link will now point to the adjusted CODAP document.

The relationship between sharing and saving

Sharing and saving are not the same thing. You can share a document without saving it. Will someone with the link get the right document if it isn’t saved? Yes.

But there’s another gotcha: Suppose you’re a teacher preparing a lesson or a student preparing a presentation. You make the CODAP document you want and enable sharing. Then you post the link to the document on the web site or in a Google doc. All is well.

But the next morning—still before the class—you realize that one calculation is wrong. Fortunately, you have the link, so you go to it, open the shared document, and fix the calculation.

Your problems are not over, however. You want to update the shared view, but the menu item is disabled. Why? Because the shared view you opened is an entirely new document, not the one you shared. Unless you actually saved that document—not just shared it—you will have to share it again, and re-paste the link into the web site.

Not only that, but if you did save it, you (of course) have to make the fix in the saved document, not in the document you get from the sharing link.

23.4 Importing data

The simplest way to import data is to drop a csv file right into your CODAP window. CODAP reads the file and makes a table out of it. Ideally, the first line of the csv has the names of attributes.

You might also notice that there is an Import item in the hamburger menu. If you choose it, you’ll see that there are two paths: Local File and URL.

Local File: Drop in or navigate to a csv or a .codap file. If it’s a csv, CODAP makes a new dataset with its own table. If it’s .codap, the new document replaces the one you’re working on.

URL: Enter or drop in a URL. You can use this to put a web page into your CODAP document. Interestingly, you can also drop a URL into your document, with the same effect.

By the way, this is also how you can install a plugin. Drop the plugin’s URL into your document (or paste it into the URL box).

xxx video showing the drag of URLS and images?

23.5 Exporting data

You can export a csv file from CODAP. Click the ruler palette in the table. You’ll find the command there. If you have made your table hierarchical, you can choose which level to export— or you can export them all.

This is a good way to share data with somebody who isn’t using CODAP. Also, sometimes you will want to take your work from CODAP to some other program, in order to do something CODAP can’t do.