|Treemap 4.1 Documentation|
[Previous] [Table of Contents] [Next]
Create your own TM3 data file
Creating a new Treemap file with a spreadsheet program:
On the first row of the spreadsheet, put all the attribute labels for your data, placing one label per cell. For example, to create a data file on traffic information (as seen above), you would put "Length (miles)" in the first cell, "Traffic Lights" in the next cell, "Speed Limit" in the third cell, and "Repairs per week" in the fourth cell. In the next row, put the type of each attribute data. Data can be of type FLOAT, INTEGER, DATE, or STRING. Data types must be typed in UPPERCASE letters. In the traffic example, one would have "FLOAT" in the first cell of the second row, "INTEGER" in the second, "INTEGER" in the third, and "FLOAT" in the fourth.
NOTE: If the attribute type is DATE, then the format should be MM/DD/YYYY. Please do not add any other values like time or day along with the date value. Make sure you enter the data values using the above mentioned date pattern only.
Fill in the values for each attribute for an item, placing one item per row. After all the attribute values are filled, include one blank column. After the blank column, list the hierarchy path starting with the name of the root. For example, "Roads" would be in the first cell after the blank column, "Highway" in the second, and "Route 1" in the last cell. (Note that the leaves of the tree do not need to be at the same depth.) Now save the file as a tab-delimited text file, such as, traffic.txt. The file is now ready to be loaded by Treemap, but we like to rename the data file with an .tm3 extension to identify them as treemap datafiles. Rename the data so the extension is .tm3 instead of .txt. After loading the .tm3 file, you can change the Legend for Color to "Location" from the control panel of treemap, which is a column containing controls on the right hand side. The picture below shows how Treemap looks like after loading the created file, traffic.txt (or traffic.tm3) and applying several settings from the control panel. (If you don't do anything after you load the file, all cells will appear as white because the default Legend for Color is "(None)".) If you apply some settings after loading a .tm3 file, you can save them. See Save Settings.
If you do no want to - or need to - include a hierarchy in the treemap because it can be created with the flexible hierarchy, simply omit to include a hierarchy in the file. The firearm.tm3 file is an example of such file. Treemap will pick the first string attribute as default attribute for labeling (the default labeling being usually the last string of the path definition found in the data file for each node.