Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation...

42
Working with Tables Working with Tables Class 10 Class 10 GISG 110 GISG 110

Transcript of Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation...

Page 1: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Working with TablesWorking with Tables

Class 10 Class 10 GISG 110 GISG 110

Page 2: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

ObjectivesObjectives

Working with Tables Working with Tables

Table structureTable structure

Table creation and manipulationTable creation and manipulation

Tabular formatsTabular formats

Connecting tables and relationshipsConnecting tables and relationships

Working with graphs and reportsWorking with graphs and reports

Page 3: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Importance of tablesImportance of tables

TablesTables

Are just as important as coordinate data in GISAre just as important as coordinate data in GIS

Used to hold attribute data, and attributes control Used to hold attribute data, and attributes control the “what” in GISthe “what” in GIS

Can be used to hold data that are not explicitly Can be used to hold data that are not explicitly spatial in nature spatial in nature – Related dataRelated data– e.g., types of treese.g., types of trees

Are the source of all statistics, summaries, Are the source of all statistics, summaries, classifications, legends and graphs in GISclassifications, legends and graphs in GIS

Page 4: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Importance of tablesImportance of tables

TablesTables

Have their own GUI, and their own set of Have their own GUI, and their own set of operationsoperations

In ArcMap, they can come from a variety of In ArcMap, they can come from a variety of sourcessources

Multiple tables can be linked or joined based Multiple tables can be linked or joined based on common field valueson common field values

Page 5: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Table basicsTable basics

Descriptive information about featuresDescriptive information about features

Each feature class has an associated tableEach feature class has an associated table

One row for each geographic featureOne row for each geographic feature

Right-clickRight-click

Page 6: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Table anatomyTable anatomy

Basic table propertiesBasic table properties

Records/rows and fields/columnsRecords/rows and fields/columns

Column types can store numbers, text, datesColumn types can store numbers, text, dates

Unique column namesUnique column names

RecordsRecords

Fields (unique names)Fields (unique names)

Attribute Attribute valuesvalues

Page 7: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

And then there was tableAnd then there was table

Tables can be created…Tables can be created…

From existing sourcesFrom existing sources

From scratch or as a new tableFrom scratch or as a new table– Adding fields to tablesAdding fields to tables– Adding records to tablesAdding records to tables– Editing values in table recordsEditing values in table records

Page 8: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Creating tables from existing Creating tables from existing sourcessources

Tables can be created Tables can be created fromfrom

dBase files (.dbf)dBase files (.dbf)

ASCII files (tab or ASCII files (tab or comma delimited)comma delimited)

INFO files INFO files (.pat, .aat, .nat)(.pat, .aat, .nat)

Database Database connectionsconnections

Page 9: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Creating a new tableCreating a new tableNew dBase tables can be created from scratchNew dBase tables can be created from scratch

In ArcCatalog, right-click on folder, select New, In ArcCatalog, right-click on folder, select New, dBase Table, name tabledBase Table, name table

Creates an empty tableCreates an empty table

Page 10: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Tabular data field typesTabular data field types

Before adding data to our fields…Before adding data to our fields…

Different field types store different kinds of Different field types store different kinds of valuesvalues

Choose the right field type for the right valueChoose the right field type for the right value

Field types vary according to table formatField types vary according to table format

TextText DateDate ShortShort LongLong BLOBBLOB FloatFloat

JupiterJupiter 7/16/19947/16/1994 1616 142984142984 9.89.8

Name: JupiterMoons: 16Diameter: 142,984 kmDate of Comet Shoemaker-Levy Impact: 7/16/1994Rotation period 9.8 hr

Page 11: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Adding fields to tablesAdding fields to tables

Each field must be defined at a timeEach field must be defined at a time

In ArcCatalog (Preview tab), select Options,In ArcCatalog (Preview tab), select Options,Add FieldAdd Field

Page 12: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Manipulating tablesManipulating tables

Once table is populated Once table is populated or existing table is or existing table is opened in ArcMap or opened in ArcMap or ArcCatalogArcCatalog– Sort ascending or Sort ascending or

descendingdescending– SummarizeSummarize– Calculate ValuesCalculate Values– StatisticsStatistics– Freeze/Unfreeze Freeze/Unfreeze

ColumnColumn

Right-clickRight-click

Page 13: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Sorting recordsSorting recordsRight-click on fieldRight-click on field

Sort Ascending or DescendingSort Ascending or Descending

In ascending order now

Page 14: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Displaying selected recordsDisplaying selected records

Selected records from tables also select Selected records from tables also select features from themesfeatures from themes

Page 15: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Freezing/UnfreezingFreezing/UnfreezingFixes a column in place for better viewing of the Fixes a column in place for better viewing of the table's contentstable's contents

A frozen column stays in place while the other A frozen column stays in place while the other columns scroll normallycolumns scroll normally

Page 16: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Summarizing tablesSummarizing tables

Creates a new tableCreates a new table

Summarizes values in Summarizes values in numeric fieldsnumeric fields

Different summary Different summary statistics availablestatistics available

Page 17: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Calculating valuesCalculating values

Acts on selected set of Acts on selected set of records records

Record values can be Record values can be altered based on altered based on expressionsexpressions

Expressions can use Expressions can use other fieldsother fields

Page 18: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Basic descriptive statisticsBasic descriptive statistics

Can be generated for a fieldCan be generated for a field

Describes selected set (or all records if there Describes selected set (or all records if there is no active selection)is no active selection)

Page 19: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

ArcGIS tabular formatsArcGIS tabular formats

Each ArcGIS spatial format has a native Each ArcGIS spatial format has a native tabular formattabular format– Coverage: INFOCoverage: INFO– Shapefile: dbfShapefile: dbf– Geodatabase: RDBMSGeodatabase: RDBMS

Create a link between related tablesCreate a link between related tables

Some spatial formats can link with multiple Some spatial formats can link with multiple tabular formatstabular formats

ArcGIS can convert ArcGIS can convert between formatsbetween formats

Page 20: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Connecting tablesConnecting tablesAttributes can be stored in feature table or Attributes can be stored in feature table or separate tableseparate table

Connect tables with common key values (fields)Connect tables with common key values (fields)

Must know table relationships (cardinality)Must know table relationships (cardinality)

Common fields

Page 21: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Table relationshipsTable relationships

How many A objects are related to B How many A objects are related to B objects?objects?

Types of cardinalityTypes of cardinality– One to one, one to many, many to one, or One to one, one to many, many to one, or

many to manymany to many

Must know cardinality before connecting Must know cardinality before connecting links links – Prevents potential omission errorsPrevents potential omission errors

Page 22: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

One-to-one relationshipOne-to-one relationship

Every record in Table A has a matching value Every record in Table A has a matching value in Table Bin Table B

Page 23: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Many-to-one relationshipMany-to-one relationship

ManyMany records in Table A have a match with records in Table A have a match with only only oneone record in Table B record in Table B

Page 24: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

One-to-many relationshipOne-to-many relationship

Only Only oneone record in Table B has a match with record in Table B has a match with manymany records in Table A records in Table A

Building occupancyBuilding occupancy– One building (Table B)One building (Table B)– Many tenants (Table A)Many tenants (Table A)– The join is to Table BThe join is to Table B

Page 25: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Joins and relatesJoins and relates

Two methods to associate tables in ArcMap Two methods to associate tables in ArcMap based on a based on a common fieldcommon field

JoinJoin appends the attributes from one onto appends the attributes from one onto the otherthe other– Label or symbolize features using joined Label or symbolize features using joined

attributesattributes

RelateRelate defines a relationship between two defines a relationship between two tablestables

Page 26: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Connecting tables with joinsConnecting tables with joins

Physical connection Physical connection between two tablesbetween two tables– Creates a virtual joinCreates a virtual join– Does not alter data Does not alter data

sourcessources

Appends the attributes Appends the attributes of two tablesof two tables

Assumes Assumes one-to-oneone-to-one or or many-to-onemany-to-one cardinalitycardinality

Access from layer Access from layer propertiesproperties

Page 27: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Joining Joining externalexternal table to a feature table to a feature classclass

Table has to be added into ArcMapTable has to be added into ArcMap

Table should be filtered in Excel programTable should be filtered in Excel program

Common field must exist between feature Common field must exist between feature class and tableclass and table

Columns cells must have same format Columns cells must have same format between table and feature classbetween table and feature class

Page 28: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Connecting tables with relatesConnecting tables with relates

Define relationship Define relationship between two tablesbetween two tables

Tables remain Tables remain independentindependent– Does Does not joinnot join but but

allows simultaneous allows simultaneous selectionsselections

Additional cardinality Additional cardinality choiceschoices– One to manyOne to many, , many many

to manyto many

Page 29: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Relating tablesRelating tables

Unlike joining tables, relating tables simply defines a relationship between two tables

The associated data isn’t appended to the layer’s attribute table like it is with a join

Instead, you can access the related data when you work with the layer’s attributes– For example, if you select a building, you can find

all the tenants that occupy that building– Similarly, if you select a tenant, you can find what

building it resides in

Page 30: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

More about tables…More about tables…

Working with tablesWorking with tables– http://www.co.dane.wi.us/lio/Working_with

_tables.pdf

Page 31: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Graphs and ReportsGraphs and Reports

Page 32: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

GraphsGraphs

Summarize tabular Summarize tabular informationinformation

Variety of graph Variety of graph formatsformats

Set display propertiesSet display properties

Add to a map in Add to a map in Layout viewLayout view

Page 33: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

GraphsGraphs

Graphical representation of tabular dataGraphical representation of tabular data

Numbers are difficult to interpretNumbers are difficult to interpret

Graphs are easy to interpretGraphs are easy to interpret

Page 34: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

GraphsGraphsDynamically linked to tablesDynamically linked to tables

Page 35: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Graph display propertiesGraph display properties

For data features (Data view)For data features (Data view)

Accessed through Accessed through layer layer Properties Properties Symbology Symbology Charts Charts

Pie, Bar/Column, Pie, Bar/Column, StackedStacked

Page 36: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Graph formatsGraph formatsA number of types of graphs exist for the A number of types of graphs exist for the layout viewlayout view

Page 37: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Add to map in layout viewAdd to map in layout viewTop 25 International AirportsTop 25 International Airports

Proximity to Point of Sales with Proximity to Point of Sales with Population and Drive TimesPopulation and Drive Times

Page 38: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

ReportsReports

Organize and display tabular dataOrganize and display tabular data

Group and format dataGroup and format data

Save and exportSave and export

Two reporting toolsTwo reporting tools– ArcMap Report writerArcMap Report writer– Crystal reportsCrystal reports

Page 39: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

ArcMap Report WriterArcMap Report Writer

Quick, easy, Quick, easy, professional report professional report creationcreationAdd imagesAdd imagesChoose fields and Choose fields and recordsrecordsAdd bordersAdd bordersTitleTitleDate and page Date and page numbersnumbersCalculate summary Calculate summary statisticsstatistics

Page 40: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Crystal reportsCrystal reportsA more powerful reporting toolA more powerful reporting tool

Export to Crystal Reports formatExport to Crystal Reports format

Wizard aids report creationWizard aids report creation

Distributed with ArcMapDistributed with ArcMap– To access reporting tools, must have To access reporting tools, must have

Crystal reports installed on your machineCrystal reports installed on your machine

Page 41: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

ReviewReview1.1. There are different field types for different table formats. (T/F)There are different field types for different table formats. (T/F)2.2. Each field should have a unique name. (T/F)Each field should have a unique name. (T/F)3.3. Different field types store different kinds of values. (T/F)Different field types store different kinds of values. (T/F)4.4. Attributes and features are linked by ______.Attributes and features are linked by ______.5.5. Coverages store attributes in an _______ file, shapefiles store Coverages store attributes in an _______ file, shapefiles store

attributes in a _______ file, and geodatabase store attributes attributes in a _______ file, and geodatabase store attributes in a _____.in a _____.

6.6. What is table cardinality and why is it important?What is table cardinality and why is it important?7.7. What is the difference between a join and relate?What is the difference between a join and relate?8.8. Multiple tables can be joined based on common field values. Multiple tables can be joined based on common field values.

(T/F)(T/F)9.9. Attributes can be stored in feature tables only. (T/F)Attributes can be stored in feature tables only. (T/F)10.10. What are the four steps to joining an external table to a What are the four steps to joining an external table to a

feature class?feature class?

Page 42: Working with Tables Class 10 GISG 110. Objectives Working with Tables Table structure Table creation and manipulation Tabular formats Connecting tables.

Remainder of ClassRemainder of Class

BreakBreak

GISG 110 SurveyGISG 110 Survey– http://www.surveymonkey.com/s.aspx?sm

=721MlLPpDXLXsuzkJ2FVhg_3d_3d

ESRI Chapter 9 ESRI Chapter 9 Joining and relating tablesJoining and relating tables

Exercise 3 questions and SANDAG exerciseExercise 3 questions and SANDAG exercise