Choosing Data Types

Data Types

An important part of the import process is assigning data types to each attribute column. If you're uploading a new dataset you'll do this during step 3 of an import. The data type assigned will not only influence how data is displayed during visualization, it will also influence how data is collected if you decide to collect further data through ODK Collect or by editing records.

There are several data types for you to choose from. If you upload data along with your import Insight will try to guess what kind of data is in each column and eliminate choices that would cause an error, for example, trying to designate a column with the data entry "cat" as a number.

Choose your data types carefully. Most can't be changed after publishing your dataset, and none can be changed if you make your dataset editable.

Screen_shot_2010-06-29_at_7.19.11_AM.png

There are several categories of datatypes, each with different properties.

Text

Screen_shot_2010-06-29_at_7.29.43_AM.png

This is the broadest datatype. Any column, and any input can be designated as text without causing an error. So, when in doubt this is the default data type. Text columns can be visualized by unique values.

Number

Screen_shot_2010-06-29_at_7.26.56_AM.png

Number covers any real number, with or without negative signs. The number data type has a variety of visualization options, including linear and graduated spectrums.

Date

Screen_shot_2010-06-29_at_7.42.11_AM.png

Date data type covers any date display with a day, month and year. Currently, date doesn't have a special display mode for visualization. However, this data type is handy for collecting data from ODK Collect or editing records, as you will be able to choose dates automatically from a calendar and the results will be formatted automatically.

Enumeration

Enumerations are preset lists of text strings. They are handy if you don't what to have to type the same thing over and over when entering data. You'll be able to simply choose from a list. Furthermore, enumerations are handy for limiting and standardizing options. For example, instead of trying to remember whether to enter "White Oak", or "Oak, White" for a tree species, you can just pick from a list.

You can either collect enumerations from your data, or you can write them out by hand.

When you choose to add an enumeration a button with three dots (like "...") will appear. When you click on it a window with a text box will appear. This is where you will enter your enumeration entries. Each entry should be on its own line.

Screen_shot_2010-06-30_at_11.30.50_AM.png

Each line has an enumeration key, followed by a space, followed by enumeration text. The key is what will show up in your data. You can even use numerical values if you need to do mathematical analysis later. The text is what will see, either when entering data manually or adding it through a handheld device. It's done this way so survey takers and data collectors can have more descriptive text, text that might be too bulky or hard to read for a dataset.

Again, keep in mind that each enumeration entry should be on its own line.

Screen_shot_2010-06-29_at_7.45.34_AM.png

Don't do this. You'll end up with 'y' as a key and 'no maybe' as display text.

Screen_shot_2010-06-30_at_12.43.37_PM.png

Also, because there is a space separator between the key and the display text, keys should not contain spaces. In the above example notice that the key and text are the same, but the key has underscores in place of spaces. The line 'white_oak white oak' will translate into having the key 'white_oak' and display 'white oak'

Finally, if you want the key and the display text to be the same, you only have to type one or the other. Insight will automatically create identical keys and text. Just keep in mind that it needs to be space free!

Image

Images are the one datatype that can't be loaded at import. Instead, images can be collected from a handheld device or uploaded one by one when editing records. This means that upon import all image columns should be blank, other than a name for the attribute. If there is any data in an image column Insight will not be able to recognize it as an image datatype.

Recent Discussions

02 Feb, 2012 02:25 PM
17 Oct, 2011 01:50 PM
14 Sep, 2010 03:51 PM
24 Nov, 2011 02:24 PM