Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Converting a word processed or pdf coding key into a set of tDAR CSV coding sheets

The goal is to get from the text of a formatted document that describes a coding system into tDAR coding sheets. In a coding sheet each line has a code followed by a comma, followed by is value, followed optionally by a description (e.g. for how this value is distinguished). For example,

1,Male
2,Female
9,Indeterminate

Is a perfectly good coding sheet consisting for three line for the column SEX.

M,Male
F,Female
?,Indeterminate

The codes, the first entry on each line of a coding sheet, must either be integers or strings. Leading zeros on integer codes are ignored, so 001 and 01 and 1 are interpreted the same (and appear as 1). Codes can also be standardized string values including strings of numbers that include decimal points.  Thus, Flr and Fil could be context codes and 01.1, 1.1, and 1.2.1 could be also all be codes that would be expressed as strings.  However, string codes must match exactly.  Thus, with a string code flr and Flr are different and 01.1 and 1.1 are different. The values and optional descriptions can have embedded spaces and can include most special characters (this is not true for ontologies, but never mind that for now). The values and optional descriptions cannot have double quotes within them (if you must they must appear as two quotes in a row"") and if they include a comma then the whole value needs to be enclosed in double quotes. The order of the lines (and hence the values) within the coding sheet doesn't matter. The codes need not be in numerical or alphabetical order.

Coding Sheets in tDAR

The set of lines that decodes all of the values for a given column of your spreadsheet or database represents a "Coding Sheet for that column. Each column that is a coded integer, real, or string needs a separate coding sheet that you will need to create in tDAR (these coding sheets to have a meaningful value associated with the code in order to make the spreadsheet useful.  Creating this association is the purpose of the coding sheet.  You will need a separate coding sheet for each coded column in the spreadsheet.  You use New in the main menu to create these coding sheets in tDAR; a coding sheet would usually reside within the same project that contains your database or spreadsheet). When you create a coding sheet in tDAR, you ned need to give it a title.  Use something that identifies your project and the variable being coded as when you need it you will only see the title.  For example:

...

There are two ways to get the coding sheet content into tDAR's coding sheet resource. As you create the coding sheet resources in tDAR,the Submit As box allows you to choose whether to upload a file in csv format from your computer (as described above), or cut and paste the lines that represent the coding sheet into a text box on the coding sheet entry. Depending upon whether you choose to upload a file or enter the information in a text box, tDAR will allow you to browse to locate the file or will give you the text box to type (or cut and paste) into. Unless it is a very simple coding sheet you will want to maintain it on your computer rather than just type it in, in case you need to change it later.

In tDAR a coding sheet has as code (e.g., 107), a value (e.g., "St. Johns Black-on-red"), and optionally a description (e.g., "matte, subglaze and glaze varieties included").  For a given coding sheet, the codes can either be all integers or they will be treated as strings. Leading zeros on integer codes are ignored, so 001 and 01 and 1 are interpreted the same (and appear as 1). Codes can also be standardized string values, including strings of numbers that include decimal points.  Thus, Flr and Fil could be context codes and 01.1, 1.1, and 1.2.1 could be also all be codes that would be expressed as strings.  However, string codes must match exactly.  Thus, with a string code flr and Flr are different and 01.1 and 1.1 are different. The values and optional descriptions can have embedded spaces and can include most special characters (this is not true for ontologies, but never mind that for now). The order of the lines (and hence the values) within the coding sheet doesn't matter. The codes need not be in numerical or alphabetical order.

If you are creating a coding sheet from scratch, the easiest thing to do is to create an excel spreadsheet with only these three columns, in this order, no headings, and nothing aftre the coding sheet information.  Save it as an xls file (not a Excel 2007 xlsx file).  You can then upload it directly to tDAR.

Alternatively you can create a text file in csv (comma separated value) format.  You can do this from scratch or can edit the information in an existing coding key document. 

In a tDAR csv format coding sheet each line has a code followed by a comma, followed by is value, followed optionally by a description (e.g. for how this value is distinguished). For example,

1,Male
2,Female
9,Indeterminate,No sex distinctive characteristics

Is a perfectly good coding sheet consisting for three line for the column SEX.

M,Male
F,Female
?,Indeterminate,No sex distinctive characteristics

The values and optional descriptions in a csv file cannot have double quotes within them (if you must they must appear as two quotes in a row, i.e.,"") and if they include a comma then the whole value needs to be enclosed in double quotes.

Converting a word processed or pdf coding key into a set of tDAR CSV coding sheets

If you have a coding key already typed up, you will want to convert that into csv format to avoid tedious retyping. The goal is to get from the text of a formatted document that describes a coding system into tDAR coding sheets.

Coding Key in a Spreadsheet

...