Reply To: merging two databases

#828
Jonathan Sandoe
Keymaster

Hello Traci,

I was assuming that you had the two data sets already in a single CODAP document, but apparently that is not the case. It seems that you have two separate CODAP documents, one with a Climate data set and the other with the Lyme Disease data set.

A single CODAP document can have many datasets. Each data set corresponds with exactly one Case Table, so you can see how many data sets you have by opening the Case Table menu in the CODAP tool bar.

There are many ways to get a data set into a CODAP document. It is easiest if the source data is in a comma separated values (“CSV”, usually a file with a ‘.csv’ extension) file or a tab delimited text file (usually with a ‘.txt’ extension.) To bring one of these files into CODAP simply drag the file and drop it in the CODAP workspace. You can also drag and drop a URL that refers to a CSV or tab delimited file. You can drag and drop as many of these files as you like and they will be added to the current collection of data sets. If you drag a ‘.codap’ file over the workspace that will replace the current CODAP document with the one in the file.

So, if you have the data in two separate CODAP documents, and don’t have an equivalent CSV or tab delimited file, what do you do? Well, that is easy! CODAP can export the data from its tables into a CSV file. Select the Case Table for the data set and click on the ruler icon on the bottom of the right-hand inspector bar. Look for “Export Case Data…” in the menu that opens up.

Concerning the “lookUpByKey” function: it is not the easiest of functions to grasp. I have made a simple example document to demonstrate, here. I hope it makes clearer how it is set up.

Jonathan