Harmoni automatically maps source variables into Harmoni typesThere are six variable types in Harmoni: Headings, Axes, Grids, Measures, Weights and Verbatims. Learn more about Harmoni Variable Types. when data sources contain aninherent dictionaryMeta-data to guide interpretation Learn more about source dictionaries..
Some data files like Excel XLXS, comma-delimited - CSV or tab delimited-TXT, do not contain an inherent dictionary and therefore need to be defined. When this is the case, Harmoni runs a prediction algorithm to determine the best possible match, but you will need to confirm or override the automated mapping.
You have the option to override the automated mapping in two ways:
1. Using the data type option wizard.
2. Inserting key identifiers in the source data.
In this article
1. Define sources
After uploading the source you wish to include in your project, you will first need to confirm or override the variable mapping before adding the source to your project. To do this, you need to click on the source data tile, which will open the mapping wizard.
If you have multiple sources, you will need to define each source. A tile with an 'orange tinge' indicates that the source needs defining in order to be a viable project source.
Harmoni will remember the mapping for the same data source. However, each separate data source needs to be mapped independently.
Data Type Option Wizard Fields
Column Name
Column names correspond to the first row in your data file. The first row must contain headers with unique, non-blank descriptions.
Data Type
Harmoni will automatically map source variables into Harmoni types using a prediction algorithm.
Mapping Data Type
You have the option to override the automated mapping and map to the following types:
- Standard Axis
- Measure
- Verbatim
Include
You can select the variables that you wish to include or exclude in your project.
CONFIRM AND ADD: Confirm the definition and add the source to the project list, ready to create the project.
CONFIRM DEFINITION: Confirm the definition. You will need to add the source to the project list prior to creating the project.
RESET: If you change the mapping for the data type, you can use the reset button to change everything back to the original settings.
CANCEL: Cancel defining the sources and return to the Upload/Connect area.
- After naming your project, choose CREATE NEW.
- Locate your data and upload.
- Select the source you wish to define.
- Data Type Option Wizard will open.
- You can change the mapping of the variables and select the variables you wish to include/exclude from the project.
- When ready, click the Confirm and Add or Confirm Definition button.
- If required, add the source(s) you want to include in your project and create.
Changing variable definition
There may be instances where after loading your project, you decide a variable in your project will suit better your design and analysis if it is a different type.
For example, if the variable "Exact Age" was initially mapped to be a measure changing to a standard axis will give you the full distribution of elements in your project.
Before the project loads, you will receive a warning message when the changes will cause items to be removed from your project. You can decide to go ahead or cancel.
- Select view/add sources.
- Select Add/Remove.
- This will open the sources area and display the data sources linked to your project.
- From the three-dot menu on source you wish to change, select Define.
- Data Type Option Wizard will open.
- You can change the mapping of the variables and select the variables you wish to include/exclude from the project.
- When ready, click the Confirm Definition button.
- Make sure the data source(s) you want to include in your project is selected and load.
- You will receive a warning message in case any of the changes will result in missing items in your project. If you decide to continue your project will load with the relevant changes.
Updating data sources
Should you need to update or replace your data, Harmoni will remember the mapping as long as it identifies it to be the same source (same name).
Harmoni will also identify new and missing variables.
2. Map variables using key identifiers
Before loading your data, you can change the column headers to include the following key identifiers to predetermine the data type.
- $ - any field starting with $ becomes a measure
- $weight - any field starting with $weight becomes a weight. Please note that the wizard will identify as a measure but when loading the project it will map as a weight.
- & - any field starting with & becomes a text item
Header names with keyword identifiers will take precedence over the mapping algorithm.
The data type option wizard will still be available; however, Harmoni will read the predetermined mapping from your source.
- Insert key identifiers in the column headers in your data.
- Load an existing Project or create a new one, and from the Sources area select Upload.
- Locate your data source and click Open.
- In the Sources area, select the source you wish to add to your project.
- The Data Type Option Wizard will open.
- Harmoni will read the predetermined mapping from your source.
- You can change the mapping of the variables and select the variables you wish to include/exclude from the project.
- When ready, click the Confirm and Add or Confirm Definition button.
- With the data source you want to include in your project selected, click OK to load.
3. Prediction Logic Algorithm
- Maximum element name length is less than 255 characters, and
- Distinct element count less than 65535, and
- Distinct element count less than 80% of sample size (current sample size is less than 65535).
- All data points in the measure are numeric.
- Anything that is not predicted as Standard or Measure, or
- Data is matching URL pattern, or
- Data is matching GUID pattern, or
- Data is matching Base64 like pattern.