Return to Outline Copyright © 2009 by Maribeth H. Price 4-1 Chapter 4 Attribute Data.

Slides:



Advertisements
Similar presentations
School of Geography FACULTY OF ENVIRONMENT Working with Tables 1.
Advertisements

Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.
CC SQL Utilities.
Lesson 12 Getting Started with Excel Essentials
Access - Project 1 l What Is a Database? –A Collection of Data –Organized in a manner to allow: »Access »Retrieval »Use of That Data.
Exploring Microsoft Excel 2002 Chapter 7 Chapter 7 List and Data Management: Converting Data to Information By Robert T. Grauer Maryann Barber Exploring.
Return to Outline Copyright © 2009 by Maribeth H. Price 6-1 Chapter 6 Spatial Joins.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
Technical Support: (989) GIS and Mapping Procedures in ArcMap 9.x Creating an ArcMap Project Editing an ArcMap Project Printing an ArcMap Project.
XP New Perspectives on Microsoft Office Excel 2003, Second Edition- Tutorial 11 1 Microsoft Office Excel 2003 Tutorial 11 – Importing Data Into Excel.
A Guide to SQL, Seventh Edition. Objectives Understand the concepts and terminology associated with relational databases Create and run SQL commands in.
Chapter 2 Querying a Database
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
Microsoft Excel 2003 Illustrated Complete Excel and Advanced Worksheet Management Customizing.
Concepts of Database Management Sixth Edition
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Chapter 2 Querying a Database
Lecture 4 Geodatabases. Geodatabases Outline  Data types  Geodatabases  Data table joins  Spatial joins  Field calculator  Calculate geometry 
Introduction to ArcGIS for Environmental Scientists Module 2 – Fundamentals Lecture 6 – Table Functions.
GIS UPDATE? Lecture 17 Lab 8: Music Festival, Part 2 – Spatial Analysis.
Introduction to Access By Mary Ann Chaney and Alicia Harkleroad.
GIS Concepts ‣ What is a table? What is a table? ‣ Queries on tables Queries on tables ‣ Joining and relating tables Joining and relating tables ‣ Summary.
Mid-Semester Lecture Exam Vocabulary Obvious steps within GIS –Selection and query processes –Working with tables –Classification concepts Projections.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 4 – Creating New.
Chapter 2 Querying a Database MICROSOFT ACCESS 2010.
Attribute Data in GIS Data in GIS are stored as features AND tabular info Tabular information can be associated with features OR Tabular data may NOT be.
ASP.NET Programming with C# and SQL Server First Edition
Key Applications Module Lesson 16 — Excel Essentials Computer Literacy BASICS.
CSS/417 Introduction to Database Management Systems Workshop 2.
Unit Two: Attribute Tables In this unit… ► Features & properties  Basic features  Rearranging columns  Freezing & Sorting columns  Field Labels & Hiding.
Microsoft Access 2010 Building and Using Queries.
Analyzing Data For Effective Decision Making Chapter 3.
XP New Perspectives on Integrating Microsoft Office XP Tutorial 2 1 Integrating Microsoft Office XP Tutorial 2 – Integrating Word, Excel, and Access.
GIS Tutorial 1 Lecture 4 Geodatabases. Outline  Data types  Geodatabases  Data table joins  Spatial joins  Field calculator  Calculate geometry.
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
Attributes in ArcGIS. ArcGIS Attributes FID – ESRI’s internal identifier Shape – Actual spatial data.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
Copyright © 2006 by Maribeth H. Price 2-1 Chapter 2 Working with ArcMap.
Copyright © 2006 by Maribeth H. Price 8-1 Chapter 8 Geoprocessing.
Chapter 17 Creating a Database.
Copyright © 2006 by Maribeth H. Price 7-1 Lesson 7 Spatial Joins.
MS Access 2007 Management Information Systems 1. Overview 2  What is MS Access?  Access Terminology  Access Window  Database Window  Create New Database.
Lesson 11: Looking at Files and Folders what a file or folder is on the computer how to recognize a file or folder on the desktop how to recognize the.
GIS 1 GIS Lecture 4 Geodatabases Copyright – Kristen S. Kurland, Carnegie Mellon University.
ArcGIS: ArcMap Tables. Agenda Opening tables The interface Working with columns Working with records Making selections Advanced table tools ▫Add fields.
SESSION 3.1 This section covers using the query window in design view to create a query and sorting & filtering data while in a datasheet view. Microsoft.
Copyright © 2006 by Maribeth H. Price 5-1 Chapter 5 Working with Tables.
A Skills Approach Access 2010 Working with Tables © 2012 The McGraw-Hill Companies, Inc. All rights reserved Chapter 2.
Return to Outline Copyright © 2011 by Maribeth H. Price 3-1 Labeling and annotation.
Queries Select by Attribute Select by Location. What is a Query? A query extracts information from a data table for further use –Once extracted you can:
Copyright © 2006 by Maribeth H. Price 6-1 Chapter 6 Queries.
1 Lesson 13 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Work with Tables and Database Records Lesson 3. NAVIGATING AMONG RECORDS Access users who prefer using the keyboard to navigate records can press keys.
Table formats ArcGIS reads table in many formats: dBase format (shapefile) INFO format (workstation ArcInfo) Geodatabase table (MS Access in case of personal.
Copyright © 2006 by Maribeth H. Price 13-1 Chapter 13 Working with Geodatabases.
Return to Outline Copyright © 2009 by Maribeth H. Price 5-1 Chapter 5 Queries.
Chapter 6. Attribute Data & Tables. Table terminology Title Field Records Each field is specifically defined and established before any data can be entered.
COMPUTER SKILLS MS-ACCESS. Introduction Access is a piece of software known as a database management system. At its most basic level, it can be used to.
Excel Chapter 1 Creating a Worksheet and an Embedded Chart
NSF DUE ; Chérie Aukland. NSF DUE ; GeoTEd Partners.
Excel Tutorial 8 Developing an Excel Application
Chapter 5 Queries.
Access Chapter 2 Querying a Database.
Chapter 4 Attribute Data.
Mastering ArcGIS Attribute Data (Continued)
Preliminaries: -- vector, raster, shapefiles, feature classes.
Mastering ArcGIS Chapter 7 Queries.
Displaying and Editing Data
ESRM 250/CFR 520 Autumn 2009 Phil Hurvitz
Presentation transcript:

Return to Outline Copyright © 2009 by Maribeth H. Price 4-1 Chapter 4 Attribute Data

Return to Outline Copyright © 2009 by Maribeth H. Price 4-2 Outline GIS Concepts –What is a table?What is a table? –Queries on tablesQueries on tables –Joining and relating tablesJoining and relating tables –Summary statisticsSummary statistics –Database storage conceptsDatabase storage concepts About ArcGIS –Working with tables in ArcGISWorking with tables in ArcGIS –Editing and calculating fieldsEditing and calculating fields –Using Excel data with ArcGISUsing Excel data with ArcGIS

Return to Outline Copyright © 2009 by Maribeth H. Price 4-3 What is a table?

Return to Outline Copyright © 2009 by Maribeth H. Price 4-4 Table terminology Title Field Records Each field is specifically defined and established before any data can be entered. Field definitions control the type of data that can be stored in a field.

Return to Outline Copyright © 2009 by Maribeth H. Price 4-5 Types of tables Attribute table –Stores attributes of map features –Associated with a spatial data layer –Has special fields for spatial information Standalone table –Stores any tabular data –Not associated with spatial data –OID instead of FID

Return to Outline Copyright © 2009 by Maribeth H. Price 4-6 Database Management Systems Dedicated systems for managing tables of data Provide data management for agencies, universities, companies, etc. Designed for multi-user environments with enhanced security needs Focus on data tables with tools for queries, reporting, graphing, etc.

Return to Outline Copyright © 2009 by Maribeth H. Price 4-7 Queries on tables

Return to Outline Copyright © 2009 by Maribeth H. Price 4-8 What is a query? A query extracts certain records from a table based on a specified condition –How many students have GPA > 3.5? –How many states have population > 1 million? –How many counties had greater population in 1990 than in 2000? –How many customers have last names beginning with “Mac” or “Mc”?

Return to Outline Copyright © 2009 by Maribeth H. Price 4-9 SQL Many databases use a special query language called Structured Query Language Can write queries that work in multiple DBMS environments Queries can be saved and reused Nearly always case-sensitive

Return to Outline Copyright © 2009 by Maribeth H. Price 4-10 SQL Query Examples Some Valid Queries SELECT *FROM cities WHERE "POP1990" >= SELECT *FROM counties WHERE “BEEFCOW_92” < “BEEFCOW_87” SELECT *FROM parcels WHERE “LU- CODE” = 42 AND “VALUE” > SELECT *FROM rentals WHERE “RENT” > 700 AND “RENT” < 1500 Programs may have an interface to help users build SQL expressions In most databases, SQL expressions are case-sensitive “Smith” ≠ “SMITH”

Return to Outline Copyright © 2009 by Maribeth H. Price 4-11 Searching for partial matches Sometimes you need to find one string within another rather than an exact match – Find all customer names beginning with “Mac” or “Mc” – Find all zip codes beginning with 0 Typically uses a “wildcard” character – *Mac* or *Mc* – 0*

Return to Outline Copyright © 2009 by Maribeth H. Price 4-12 The Like Operator “NAME” LIKE ‘%(D)%’ –Finds all of the (D) Democrats % is wildcard Ignores Don or Danforth “NAME” LIKE ‘%New %’ –Would find New Hampshire and New York, but not Newcastle or Kennewick

Return to Outline Copyright © 2009 by Maribeth H. Price 4-13 Query results The result of a query is a set of selected records that meet the criteria Subsequent operations on the table will use only the selected records and ignore the others. A user might… –Export the selected records to a new table –Calculate statistics on the selected records –Calculate new values for the selected records –Produce a report based on the selected records

Return to Outline Copyright © 2009 by Maribeth H. Price 4-14 Joining and relating tables

Return to Outline Copyright © 2009 by Maribeth H. Price 4-15 Joining tables Join tables on common field Joined table Destination tableSource table

Return to Outline Copyright © 2009 by Maribeth H. Price 4-16 Join facts Joins are temporary relationships between tables used by a relational DBMS Tables must share a common field (key) Treats the two tables as a single table Original stored data is not affected Can be removed when no longer needed

Return to Outline Copyright © 2009 by Maribeth H. Price 4-17 One-to-one joins When each record in the destination table matches exactly one record in the source table, we call it a cardinality of one- to-one. Destination table (always imagine on the left) Source table (always imagine on the right)

Return to Outline Copyright © 2009 by Maribeth H. Price 4-18 Types of Cardinality One-to-one –States to Governors –Husbands to wives One-to-many –States to cities –Districts to schools Many to one –Cities to states –Schools to districts Many-to-many –Students to classes –Stores to customers In evaluating cardinality, always put the destination first. (Destination on the left)

Return to Outline Copyright © 2009 by Maribeth H. Price 4-19 Rule of Joining Each record in the destination table must match one and only one record in the source table. One to one Destination table Source table Many to one

Return to Outline Copyright © 2009 by Maribeth H. Price 4-20 One to many Destination table Source table ? Violates the Rule of Joining Record to join to destination is ambiguous Must use a relate instead

Return to Outline Copyright © 2009 by Maribeth H. Price 4-21 Relates Similar to a join except that –The tables remain separate –Items selected in one table may be highlighted in the related table

Return to Outline Copyright © 2009 by Maribeth H. Price 4-22 States: Select the New England States Congress Reps of New England States Related tables

Return to Outline Copyright © 2009 by Maribeth H. Price 4-23 Summary statistics

Return to Outline Copyright © 2009 by Maribeth H. Price 4-24 Statistics on a table field Based on values in a field. Includes all records or a subset based on a query.

Return to Outline Copyright © 2009 by Maribeth H. Price 4-25 Summarizing tables Calculate statistics for groups of features in a table Groups by unique values in the one field User chooses statistics to calculate for other fields Produces another table as output with groups and stats How many people live in each subregion? What is the total area of each subregion?

Return to Outline Copyright © 2009 by Maribeth H. Price 4-26 Summarizing tables How many earthquakes in each state? Total deaths and damage in each state? Average magnitude in each state? Historic major earthquakes

Return to Outline Copyright © 2009 by Maribeth H. Price 4-27 How to summarize Right-click State field Sum Deaths Sum Damage Average Mag Average MMI

Return to Outline Copyright © 2009 by Maribeth H. Price 4-28 Database storage concepts

Return to Outline Copyright © 2009 by Maribeth H. Price 4-29 Fields Fields have specific types available Must be defined before use Once defined, cannot be changed Naming rules –No more than 13 characters –Use only letters and numbers –Must start with a letter

Return to Outline Copyright © 2009 by Maribeth H. Price 4-30 Binary data Fundamental mode of computer storage Data are stored as a series of 0’s and 1’s representing numbers in base 2 (bits) Bits are grouped by eight to form 1 byte. A megabyte (MB) is 1 million bytes bit one byte In base 2: = = = = 65, = 65,566 two bytes

Return to Outline Copyright © 2009 by Maribeth H. Price 4-31 ASCII storage American Standard Code for Information Interchange (ASCII) Stores letters, characters, and symbols as single 7-bit binary codes CAT = {67,65,84} decimal = cat = {99,97,116} decimal = = {49,52,56} decimal =

Return to Outline Copyright © 2009 by Maribeth H. Price 4-32 About ArcGIS Chapter 4. Attribute Data

Return to Outline Copyright © 2009 by Maribeth H. Price 4-33 Working with tables in ArcGIS

Return to Outline Copyright © 2009 by Maribeth H. Price 4-34 Tables in ArcGIS Tables contain attribute data Many formats, one interface

Return to Outline Copyright © 2009 by Maribeth H. Price 4-35 Sources of tables Dbase files INFO files ASCII Text files (tab or comma delimited) Records from SQL database systems Excel worksheets

Return to Outline Copyright © 2009 by Maribeth H. Price 4-36 ArcMap table interface Title Field Right-click field name to get menu Records Status bar Options menu

Return to Outline Copyright © 2009 by Maribeth H. Price 4-37 Adjusting field width Temporary, does not affect stored file Hover over field break to get double arrow, then drag

Return to Outline Copyright © 2009 by Maribeth H. Price 4-38 Field properties tab Field alias Hide field

Return to Outline Copyright © 2009 by Maribeth H. Price 4-39 Shortcut to field properties

Return to Outline Copyright © 2009 by Maribeth H. Price 4-40 Formatting field display

Return to Outline Copyright © 2009 by Maribeth H. Price 4-41 Table appearance

Return to Outline Copyright © 2009 by Maribeth H. Price 4-42 Sorting tables Has no effect on original data

Return to Outline Copyright © 2009 by Maribeth H. Price 4-43 Select by Attributes Some valid queries [POP1990] > “STATE_NAME” = ‘Alabama’ [POP2000] >= [POP1990] Note: DBF tables have field names enclosed in quotes Geodatabase tables have field names enclosed in brackets

Return to Outline Copyright © 2009 by Maribeth H. Price 4-44 Selecting records

Return to Outline Copyright © 2009 by Maribeth H. Price 4-45 Show selected

Return to Outline Copyright © 2009 by Maribeth H. Price 4-46 Clear Selection On toolbar From table options menu From main menu

Return to Outline Copyright © 2009 by Maribeth H. Price 4-47 Field statistics

Return to Outline Copyright © 2009 by Maribeth H. Price 4-48 Statistics Statistics for fields are based on the selected records

Return to Outline Copyright © 2009 by Maribeth H. Price 4-49 ArcGIS field data types Geodatabases and shapefiles Short Integers stored as signed 2-byte binary numbers (value range from -32,000 to +32,000) Long Integers stored as signed 4-byte binary numbers (value range from -2 billion to +2 billion) Float Floating point values with 8 significant digits in the mantissa e12 Double Double-precision floating point values with 16 significant digits in the mantissa e13 Text Alphanumeric strings‘Maple St’ Date Date format07/12/92 BLOB Binary large object; any complex binary data including images, documents, etc.

Return to Outline Copyright © 2009 by Maribeth H. Price 4-50 Field characteristics Length –The total characters a text field can store Precision –The total width of digits a numeric field can store Scale –The number of decimal places Length = 10 Maple St. Maple Stre

Return to Outline Copyright © 2009 by Maribeth H. Price 4-51 Adding a new field In ArcCatalog layer properties

Return to Outline Copyright © 2009 by Maribeth H. Price 4-52 Adding a field In ArcMap

Return to Outline Copyright © 2009 by Maribeth H. Price 4-53 Editing and calculating fields

Return to Outline Copyright © 2009 by Maribeth H. Price 4-54 Editing fields Open Editor toolbarStart editing Type edits in fields Save edits, stop editing

Return to Outline Copyright © 2009 by Maribeth H. Price 4-55 Calculating fields Add a new field if necessary Consider whether you need decimal places!

Return to Outline Copyright © 2009 by Maribeth H. Price 4-56 Calculate Right-click field to calculate Enter expression

Return to Outline Copyright © 2009 by Maribeth H. Price 4-57 Geodatabase geometry measures Automatically created and maintained –Usually appear at end of table Shape_Area field Shape_Length field –Units will match units of the coordinate system

Return to Outline Copyright © 2009 by Maribeth H. Price 4-58 Coverage geometry measures –Automatically constructed –Updated whenever the BUILD or CLEAN command is used to update topology LENGTH field in arc tables AREA field in polygon tables PERIMETER field in polygon tables

Return to Outline Copyright © 2009 by Maribeth H. Price 4-59 Shapefile geometry measures Shapefiles DO NOT create or maintain these fields automatically! –Must be created and updated manually –Some functions and operations can change the lengths and areas of features –If you find an AREA field there is no guarantee that it is correct

Return to Outline Copyright © 2009 by Maribeth H. Price 4-60 Be careful! Before After AREA/LENGTH/PERIMETER fields in shapefiles are NOT automatically updated if features change. Don’t use one of these fields unless you are CERTAIN that they are correct. These area/perimeter fields are likely from a coverage

Return to Outline Copyright © 2009 by Maribeth H. Price 4-61 User geometry calculations Create field to hold values Choose type, coordinate system, and units Not automatically updated if features change!!!

Return to Outline Copyright © 2009 by Maribeth H. Price 4-62 Test yourself: True or False? A field named AREA in a shapefile will always have the correct area? –False. Shapefile area fields are not automatically maintained. A field named AREA in a geodatabase will always have the correct area? –False. Automatically updated fields in a geodatabase are called Shape_Area. A field named AREA in a coverage will always have the correct area? –True. Automatically updated area fields in a coverage ARE called AREA.

Return to Outline Copyright © 2009 by Maribeth H. Price 4-63 How to join or relate tables To start, right- click the destination table.

Return to Outline Copyright © 2009 by Maribeth H. Price 4-64 Using Excel data with ArcGIS

Return to Outline Copyright © 2009 by Maribeth H. Price 4-65 Excel files Excel worksheets with suitable layout can be opened as tables in ArcGIS Most functions that do not involve changing the file will work (sort, query) Tables cannot be changed or edited

Return to Outline Copyright © 2009 by Maribeth H. Price 4-66 Excel file requirements First row must contain field headings with legal field names as defined earlier No blank rows or formulas should be used Each column should contain only text or only numbers. It is helpful for each column to be formatted as text, numeric, etc. ArcMap cannot open files that are already open in Excel—they must be closed first

Return to Outline Copyright © 2009 by Maribeth H. Price 4-67 Acceptable Worksheet Correct field names Columns formatted as text or numeric No formulas or blank lines

Return to Outline Copyright © 2009 by Maribeth H. Price 4-68 Workbooks and worksheets An Excel workbook file (.xls) may contain more than one worksheet. By default there are three named Sheet1, Sheet2, Sheet3. There may be one or more named worksheets. ArcMap can only open one worksheet at a time. You will open the workbook like a folder and select a single worksheet

Return to Outline Copyright © 2009 by Maribeth H. Price 4-69 Adding a worksheet 1. Add data button 2. Open workbook file like a folder 3. Add named worksheet, or the first unnamed worksheet.

Return to Outline Copyright © 2009 by Maribeth H. Price 4-70 Excel file in ArcMap You can use x-y locations in a table to produce points on a map. But first you must know the coordinate system of these locations. What is this one?

Return to Outline Copyright © 2009 by Maribeth H. Price 4-71 Add XY Data You MUST use the Edit button to define the coordinate system. Degrees indicate a geographic coordinate system (GCS). NAD83 is the most common in use today, but if you know it is something different you must use that. Other tables might have units in UTM meters, State Plane feet, etc. You must know the coordinate system to create usable, correctly located points.

Return to Outline Copyright © 2009 by Maribeth H. Price 4-72 Oregon climate stations Stations appear as points on the map, an “event layer” Export to shapefile or feature class to keep permanently