Hosted by "1PLs Agency"

Marine Data Literacy 2.0

Providing instruction for managing, converting, analyzing and displaying oceanographic station data, marine meteorological data, GIS-compatible marine and coastal data or model simulations, and mapped remote sensing imagery





Home > 2. Marine GIS > 2.11 Number Spreadsheet

2.11 Adding a Number-Dominated Spreadsheet to a Project Map in Saga

  • Exercise Title:  Adding a Number-Dominated Spreadsheet to a Project Map in Saga

  • Abstract:  Spreadsheet data, for example exports from Ocean Data View (ODV), can easily be added to GIS systems, but there are differences between how text and numerical data fields are treated.  In this exercise a spreadsheet that contains mainly numerical data is treated.    The resulting data object, after a simple conversion, is a "point shape" that can be displayed on a map, or used as the input for gridding (in Saga).  [Preparatory filtering of the data must be done in ODV, the table source, and not here.]

  • Preliminary Reading (in OceanTeacher, unless otherwise indicated):

  • Required Software:

  • Other Resources: 

  • Author: Murray Brown

  • Version:  5-19-2015

1.  Open the 0m_5m spreadsheet, (above) in any ASCII editor, and delete all lines above the "Cruise Station etc." line.  Saga cannot handle extra "header" lines.
2.  It will also make your data browsing (with ODV extractions in Saga) easier if you:
  • Do a global FIND and REPLACE to change the string ~$m~# to the letter u
  • Delete the single occurrence of the string :METAVAR:UNSIGNED_INTEGER
  • Study the ODV manual to make other replacements made necessary by ODV's special syntax to specify Greek characters
3.  Save the file back to the same folder with the name data_from_osd_jfm_0m_5m_liberia_wod_noheader.txt
3.  Do the same thing with the other spreadsheet, making data_from_osd_jfm_350m_450m_liberia_wod_noheader.txt
4.  Run Saga, then use FILE > SHAPES > LOAD to load the shapes for the world borders and for the Liberian frame (lines), if you made it.  Then show them on the same map.
5.  In Saga, use FILE > TABLE > LOAD TABLE to load both of the "no header" data tables.
6.  Right-click on the 0m_5m table, and select SHOW.
7.  This opens the table, allowing you to examine its contents.  Take a few minutes to see all the columns, and try to identify them, based on your knowledge of ODV.

We could have "left behind" many of the variables in ODV, but you never know which ones you need until you are ready to analyze in Saga.  If you ever find that your data table is too large to load, then go back to ODV and cut down on the number of variables, but most of the time it is best to take all of the variables for further management/analysis in Saga.

8.  There are a few graphical things you can do with tables, but nothing as powerful as the routines available for point shapes.  So in the next panel we'll convert the table to a point shape.
  • For POINTS - Select CREATE
  • For TABLE - Navigate to and select the 0m_5m table
  • For X, select LONGITUDE
  • For Y, select LATITUDE

Then click OK.

10.  Repeat these steps for the 350m_450m table.  Make sure that the line for POINTS is reset to CREATE!!
11.  Now you have two new shapes, as shown here.  Right-click on the 0m_5m shape, and select ADD TO MAP.
12.  Select the existing map for the display.  Initially, the points will all be a single color.
13.  In the properties window, select TYPE = GRADUATED COLOR
14.  If you want more colors than the 10 offered now.  Click just to the right of the little color swatch and the words 10 COLORS.

That opens this color control, where you can select:

  • COUNT - Number of colors
  • RANDOM - Random colors that have no numerical meaning
  • PRESETS - Ready-to-use color palettes
14.  Make these choices:
  • COLORS > COUNT - 100
  • COLORS > PRESETS - Rainbow
  • ATTRIBUTE - Temperature

Click OK twice to close these color controls.

15.  When you select SETTINGS > APPLY at the bottom of the panel, this is what you should see.

The "purple" dots are no-data stations.

16.  Whenever you map anything with graduated colors, then display a histogram so you can understand the color-value mapping.
17.  Right-click on the 0m_5m shape, and select SHOW HISTOGRAM.
18.  Immediately, you can see there is a small  problem due to the presence of very low (9?) values, causing the palette to be skewed away from the actual range of good data (approximately 20-30 degrees).
19.  In the properties window, set the VALUE RANGE from 20-30, then click SETTINGS APPLY.
20.  The histogram immediately looks better.
21.  And the points appear a little more understandable.  But recall that these data are for all 12 months, so we can't expect anything really definitive.

NOTE:  The legend appears when you click the LEGEND tab in the lower right corner.

22.  Repeat these steps to see the 350m_450m temperature points.  This pattern looks more understandable, due to the relatively constant values at that depth.
23.  Previously this exercise include steps to find and delete records that had values (of temperature, for example) that were outside the expected range, or that appeared strange.  Currently, we advise you to do all this quality-control work in ODV only.  Leave Saga just for GIS analysis and display.
24. Recent note from Saga author Volker Wichman about adding a data table with a date field:
  • When you load a comma separated (or tab delimited) table in SAGA, there are only three data types supported: strings, integers and floats
  • So you have to use quotes and the following format:
  • With the following table the date should be correctly recognize as data type string:
    id date
    0 "19.05.2015"
  • After loading the table to SAGA, you can use the "Change Field Type" tool to change the data type of the date field to "date".