Coding Sheets

Home » Using tDAR » Creating and Editing Resources » Coding Sheets

Creating or Editing a Coding Sheet


If you are just preparing to upload a new Coding Sheet and would like to preview in a condensed format the information you will be asked to provide, check out our Metadata Guide for Coding Sheets. This downloadable document summarizes the metadata required to upload a Coding Sheet.

What is a Coding Sheet?


A Coding Sheet contains all the information that allows tDAR to decode the coded values for the columns in a spreadsheet or database. It is common practice to provide a text-based coding sheet with published datasets so that users can interpret your data and replicate your methods. In tDAR, a coding sheet serves the same purpose, but when you enter your information using tDAR’s Coding Sheet page, this allows tDAR to make sense of the columns in your dataset – the user does not need to necessarily “translate” the meaning of the coded values manually when they view your spreadsheet or database.

Each column that is a coded integer, real, or string needs to have a meaningful value associated with the code 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.

If you are just preparing to upload a new Coding Sheet and would like to preview in a condensed format the information you will be asked to provide, check out our upload guide. This downloadable document summarizes the metadata required to upload a Coding Sheet.

Preparing a Coding Sheet


There are two ways to enter a coding sheet into tDAR: as an Excel (.xls) file or CSV file, or you can manually enter or cut and paste the lines that represent the coding sheet into a text box on the coding sheet web entry form. 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 supply 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, if all of the codes are integers, they will be treated as numbers. Otherwise, codes are treated as strings. Thus, 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 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.

Coding Sheet From Scratch

If you are creating a coding sheet from scratch or have one already in Excel format, the easiest thing to do is to create an Excel file for each coding sheet. Each Excel file will have only these two or three columns, in this order (code, value, description), no headings, and nothing after the coding sheet information. Save these as xls files (not as Excel 2007 xlsx files) or CSV files. You can then upload these files directly into tDAR coding sheets. In a tDAR CSV format coding sheet each line has a code followed by a comma, followed by its value, followed optionally by a description (e.g. for how this value is distinguished).

Here is an example of a three-line coding sheet for the column SEX as shown in Example Table 1:

Example CSV Coding Sheet for Table 1

1,Male

2,Female

9,Indeterminate,No sex distinctive characteristics

Example Table 1

ID

SEX

847

2

848

1

849

9

850

2

Alternatively, your code may use letters and symbols as in Example Table 2:

Example CSV Coding Sheet for Table 2

M,Male

F,Female

?,Indeterminate,No sex distinctive characteristics

Example Table 2

ID

SEX

847

F

848

M

849

?

850

F

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.

Coding Key in a Spreadsheet

If your coding key sheet was created in Excel or another spreadsheet, you need to arrange it so that the codes are in the first column (A), their values in the second (B), and more elaborate descriptions are optionally in the third column. There should be nothing to the right of the third column.

Here is an example of an Excel format coding sheet for Example Table 2:

Example Excel Coding Sheet for Table 2

Example Table 3

ID

SEX

847

F

848

M

849

?

850

F

Multiple Coding Sheets


If you have multiple coding sheets in one spreadsheet you can select the rows that correspond to your coding sheet and say Save As to save a file with just those rows. If you are using Excel, you can just save the file as a normal Excel xls file in an appropriate folder on your computer. tDAR will read these, expecting the information in two or three columns. If you aren’t using Excel (this also works if you are) you should Save As and select “CSV” format and name and save the file. When you Save As into CSV in Excel you will get a message about losing features, just say OK.

If your coding key is an Adobe Acrobat (pdf) or word-processed document, the conversion is a bit more work but for a long coding key it will probably be worth it. You can’t save either a word-processed (e.g. Word) or pdf file directly to CSV.

Coding Key in a Word Processor Document


If you already have a coding sheet typed in a word processing program, you can use the search and replace function to help edit the document and save time formatting. You will need to convert the format of the document into a series of sets of lines, each of which is a single coding sheet in CSV format. This is likely to be less time consuming than converting the file to an Excel format.

For example, you will want to convert tabs to spaces or commas (depending on where they are, convert multiple spaces to single spaces, eliminate leading spaces, and eliminate text within the lines of a specific coding key that should not be part of the key. Note that Word and most word processors have means to replace formatting characters such as tabs (in Word 2007, select replace and then click on the Find tab of the window that opens. At the bottom of this window click on “More” and then click on Format to insert a special character into the find box). You then click on the replace tab and enter the replacement text. You then use Save As to save the modified coding key document in a text format. When you Save As you must first select Plain text (.txt) in the dropdown box of formats in Word (or perhaps ASCII format in other word processors). If Word asks, “Windows Default” is OK.

Next you will want to open the plain file in a basic text editor and fix any problems. Things may show up in the text editor that you do not see in the word processor’s view. For Windows machines, the supplied text editor is Notepad which is found in the Accessories folder of “All Programs”. Basic text editors can also be downloaded from the web.

If your text file includes multiple coding sheets (i.e., for multiple columns) then it is easiest to cut and paste each subset into the appropriate tDAR coding sheet. To do this, you create the coding sheet in tDAR, name it, and then where it says Submit As, select manual entry into a text box. Then a text box will open at the bottom of the form. You can then go back to your text document, select the lines corresponding to this coding sheet, copy them, return to the tDAR form, and paste them into the text box. Then submit the coding sheet.

Alternatively, you can save each set of lines in the text document as a separate file. The easiest way to do this is to open another instance of Notepad with a blank document and cut or copy the lines for a single coding sheet to the blank Notepad document. Then, for the new document, you will want to Save As a file name with a CSV extension, such as “species codes.csv”. In this case, on the tDAR web form, you use the upload rather than manual entry into a text box option in tDAR. You then browse to the file on your computer, select it, and submit the tDAR form.

To convert a pdf document (that has been character recognized), the process is similar. You will want to select all the text in the document, then open a text editor such as Notepad (see above) and paste the text into it. You can then use search and replace and edit the document into the proper format as you would have done, above, with your word processor.

Entering A Coding Sheet in tDAR


Creating a Coding Sheet

To create a new Coding Sheet, locate the “Upload” button on the tDAR toolbar (You can access this toolbar and button on any page within tDAR). This will bring you to the “Create and Organize Resources” page. Clicking “Coding” will take you to the “Creating: New Coding Sheet” page.

Basic Information

Basic information for a Coding Sheet includes the record status, title, and year. Enter the general information for your project as text in the provided fields.

Choosing a Status

In the Status field, select the status (either active or draft) that describes the state of this information resource. Select active to indicate that metadata entry is complete and that the resource is ready to be published once it is submitted. The status active means that the data set metadata are visible to all users through searching and browsing.

Select draft to indicate that metadata are NOT complete and that the resource is NOT ready to be published. Use the draft status to save your work (remember to click the submit button at the bottom of the data set entry page, though, to save your metadata in tDAR).

Note: Status does not inherit from a project to resources inside that project. Thus, a project may be marked as a “draft” or even “deleted” without affecting any of the resources within it.

Entering the Year

The “Year” field documents the year in which this data set was created and/or “published” in its current state. Use the textbox to enter the year your data set was created.

Choose an Account to Bill From

If you already have a billing account with tDAR, simply select the account you would like to bill to. If you do not have a billing account set up, see Creating and Managing Billing Accounts.

Coding Sheet Creators

In the “Coding Sheet Creator” data entry section, list the persons who contributed to the construction of the dataset you are uploading to tDAR. A person who contributed to the creation of the data set may have served as an analyst, data entry technician, data collector/aggregator, data set designer, etc.

Begin entering the name of a data set creator in one of the name fields in the “Person” data entry section. tDAR will make suggestions from a list of tDAR users and other entered persons (i.e., other creators, authors, editors, etc.). If one of the suggested persons matches the person you wish to identify as a data set creator, select that person. If the suggested persons do not include the person you want to identify, then enter that person’s name, email address, and institutional affiliation as accurately as possible. Enter a current email address and institutional affiliation ONLY if you are confident it is accurate.

To add additional creators, click on the “add another” button. Enter the appropriate information for that person and select the appropriate role.

In some cases, an individual person may not be credited with Coding Sheet creation. Rather, an institution may be identified as creator of the coding sheet. To add an institution as a creator, click on the “add another” button and select “Institution”.

Additional Citation Information

Additional citation information prompts you to add additional descriptors related to the publication of your coding sheet. Enter the language that is used in your Coding Sheet.

Abstract/Description

This text field allows you to provide a narrative about the content of the Coding Sheet. You will likely want to describe the research that guided the construction of the data set, some of the primary variables and variable states, the use and/or potential uses of the Coding Sheet, and any important information that users may need to know to apply your data. Use the textbox provided to enter an abstract.

Category/Subcategory

Use the dropdown menu to select the category that best describes the data in the Coding Sheet (e.g., pottery, basketry, etc.). For some fields, a subcategory dropdown will populate in the subcategory dropdown.

Map to an Ontology

You can map your Coding Sheet to an existing Ontology in tDAR. Simply begin typing the name of an Ontology and possible selections will appear in the dropdown menu. This is important if you would like your data to be available for integration using the Data Integration tool. You can also choose to create a new Ontology using the button below the Ontology Name dropdown.

Submit Coding Sheet

In this section, submit the Coding Sheet that you have prepared as described in the first section of this tutorial. First, use the “Submit as” dropdown to select whether you would like to upload an Excel or CSV file, or enter your data manually. If you select “Upload an Excel or CSV coding sheet file” your prompts will appear as shown below.

If you select “Manually enter coding rules into a text area” you will see the following prompts. Type or copy and paste your coding sheet rules into the “Coding Sheet” text box.

tDAR Collection and Project

You can add your coding sheet to an existing Collection or Project that you have permission to edit. To select a collection, start typing the name of the collection in the text box and select the name when it appears in the drop-down box. You may also use this text box to name a new, public Collection that will be created when you save your dataset and will only contain the new Coding Sheet. To choose a Project, use the drop-down menu to select from Projects that you have permission to edit. Check the box below the project text box to enable inheritance of metadata from that Project.

Institution Authorizing Upload of this Coding Sheet

The “Institution Authorizing Upload of this Coding Sheet” section records the institution that “owns” the resource (i.e., sponsored the production or publication of the document) and/or that gave you permission to upload the resource to tDAR. For example, if the Bureau of Land Management (BLM) sponsored a report and they provided you permission to upload that report to tDAR, the BLM should be entered in the “Institution Authorizing Upload of this Coding Sheet” section.

Individual and Institutional Roles

You can use these fields to credit the individuals and institutions that contributed to the resource. You can toggle between person and institution using the buttons on the left side of the text boxes. Select the role that best describes their contribution. Use the “add another” button to add additional contributors.

Notes

The notes field allows you to enter any additional information about your Coding Sheet that is not captured in the metadata fields. This field acts as a comments section, where you can enter a small narrative that might help other users better understand some important aspect of your project.

Select the type of note you wish to create from the “Type” drop-down box. Enter your note in the text field provided.

Save your entry and your Coding Sheet has been created