




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





This tutorial introduces a selection of basic data processing tasks with spreadsheets, geared towards GIS users. Data tables must follow strict formatting rules in order to be used in GIS, and a substantive amount of time is often needed for processing attribute data in preparation for mapping and analy- sis. Spreadsheets are powerful and accessible tools that are practical for processing data for small projects. These examples were written using MS Excel 2019, but can be replicated in other pack- ages. Basic spreadsheet knowledge (selecting columns and rows, copying and pasting, saving files) is presumed. Before we begin, download the tutorial data file data_processing_tutorial.zip from the Canvas GIS Institute page, save it on your computer, and unzip the file.
Conventions used in this tutorial:
In this tutorial we will type formulas (also called functions) directly into cells. For help with formulas, you can insert them using the fx function button located above the cell block.
The sample data is a global spreadsheet of copper smelters created by USGS researchers in 2003 (metadata is included with the spreadsheet). This dataset was selected because it presents a number of common data processing challenges; like many spreadsheets it is formatted for display rather than data analysis. We will reformat this data with the intention of plotting the smelters in GIS using their coordinates, and summarizing it by country to join it to a country shapefile for thematic mapping. Additional data includes a country boundary file from Natural Earth https://www.naturalearthdata.com/, and a CSV file of ISO 3166 country codes.
Never work directly in the original file, in case you need to refer back to it. Make a copy; you could copy the entire file, but in this case we will combine this with an additional step of removing
formatting. The Copy - Paste Special - Values process is one you will use over and over again. Use it to eliminate formatting and to replace formulas with the actual values output from the formula.
2 Remove Headers and Footers
Data tables can only have a single header row, and cannot have footnotes or subtotals.
3 Making Values Explicit
The names of the countries in the sheet appear once on their own row as subheadings, and the rows that follow represent smelters in that country. In a data table, each row must represent a unit or record of data. We need to explicitly associate country names with each individual row, and eliminate the country subheader rows.
Columns. Choose Delimited, and in the next window check Comma and nothing else. Click Finish. This leaves Locations (with and without feature Names) in Column B and states (with and without feature names) in Column C, split apart based on the location of the comma.
5 Naming Columns
Tables that are being imported into GIS or a database cannot have column names that are: too long, contain spaces, contain punctuation (except underscores), or begin with numbers. Some like to
use camel case (PctTotal) to distinguish different parts of the name, while others prefer snake case (pct_total). Use common sense abbreviations for values (pct, avg, tot) and units (km, vol, sqmi).
6 Splitting Text with Formulas
Formulas can also be used for splitting strings of text into distinct values. For example, the process column contains footnotes in parentheses. In GIS or a database, this would prevent us from summarizing data into categories using this field, as a single category would be split into two (one with and without a footnote). The following example illustrates how to use substring formulas for this type of work. We will strip the process name out of the cell without the footnote.
9 Pivot Tables
The smelter data is now in a well formed state, and the coordinates in this file can be used to plot smelter locations. What if we wanted a summary table by country, so we could potentially join this table to a shapefile and map it? A pivot table makes this possible.
status under the Filters section. In the table on the left, change the dropdown for status to Operating to remove smelters that are not open. Save your work.
10 Final Steps