420 likes | 540 Views
Tables. ESRM 250/CFR 520 Autumn 2009 Phil Hurvitz. Overview. Using ArcMap tables Querying tables Table relationships Graphs from tables. Using ArcMap tables: Introduction. Tables are just as important as coordinate (map) data Tables are used to hold attribute data
E N D
Tables ESRM 250/CFR 520Autumn 2009 Phil Hurvitz 1 of 42
Overview • Using ArcMap tables • Querying tables • Table relationships • Graphs from tables 2 of 42
Using ArcMap tables: Introduction • Tables are just as important as coordinate (map) data • Tables are used to hold attribute data • Tables can be used to hold data that are not explicitly spatial in nature • Tables are the source of all basic statistics 3 of 42
Using ArcMap tables: Overview • Creating tables from existing sources • Creating a new table • Adding fields (columns) to tables • Adding records (rows) to tables • Editing values in table records • Calculating fields 4 of 42
Creating tables from existing sources • Tables can be created from existing sources: • dBase files • ASCII files (tab or comma delimited) • INFO files • ODBC connections 5 of 42
Creating tables from ODBC connections • Tabular data can be obtained from ODBCdatabases (e.g., Oracle, Access) 6 of 42
Creating a new table • New (dBase, GDB) tables can be created from scratch • Creates a new file on disk • New table is empty 7 of 42
Adding fields to tables • Each field must be defined at add time • Data type and storage parameters need to be defined 8 of 42
Tips for defining fields • Field data types should match the data they will store • Short Integer: Whole numbers from -32,768 to 32,768 • Long Integer: Whole numbers from -2,140,000,000 2,140,000,000 • Float: single-precision floating-point numbers with an accuracy to 6 places past the decimal • Double: double-precision floating-point numbers with an accuracy to 15 places past the decimal • Date: January 1, 0100 to December 31, 9999 • Text: 1 - 255 characters 9 of 42
Tips for defining fields • Precision = number of digits • Scale = digits to the right of the decimal point • e.g., 100.27 • precision = 5 • scale = 2 10 of 42
Adding records to tables • Records can be added ad hoc to stand-alone tables • Do not add records to feature data (point, line, polygon) tables • Adding features (feature editing) will automatically add a record to the feature attribute table • Adding records to feature attribute tables will result in “phantom” records that are not associated with shape features 11 of 42
new record Adding records to tables • Records can be added ad hoc to stand-alone tables • New records will have null values for all fields until updates are made 12 of 42
Calculating fields • Values in a new field can be generated based on calculated expressions • Expressions can use other fields • Acts on selected set of records 13 of 42
Overview • Using ArcMap tables • Querying tables • Table relationships • Graphs from tables 14 of 42
Querying tables • Making queries • Sorting records • Displaying selected sets • Modifying selected sets • Basic descriptive statistics • Table summaries 15 of 42
Making queries • Select records from tables • “Select by attributes” • Graphical interface to table data • Selected records in cyan 16 of 42
Displaying selections • Displaying selected records will show only those records that are in the selected set 17 of 42
Sorting records • Record can be sorted ascending or descending by field 18 of 42
Displaying selected sets • Selecting records from feature tables also selects features from layers (and vice versa) 19 of 42
Modifying selected sets • Existing selections can be broadened or narrowed • Additional query criteria • Add to selection • Remove from selection • Further narrow down current selection 20 of 42
Basic descriptive statistics • Basic descriptive statistics can be generated for a field • will describe selected set (or all records if there is no active selection) 21 of 42
Table summaries • Summarizing tables • Creates a new table • Summarizes values in numeric fields by values in a categorical field • One output record per unique value in the (categorical) field of interest • Different summary statistics available 22 of 42
Table summaries 23 of 42
Overview • Using ArcMap tables • Querying tables • Table relationships • Graphs from tables 24 of 42
Table A Table B Record relationships among tables • One-to-one relationship • every record in Table A has a matching value in Table B 25 of 42
Record relationships among tables • Many-to-one relationship • Many records in Table A have a match with only 1 record in Table B Table A Table B 26 of 42
Record relationships among tables • One-to-many relationship • Only 1 record in Table B has a match with many records in Table B Table A Table B 27 of 42
Joining tables • Creates a virtual join (does not alter data sources) • Used for: • one-to-one • many-to-one 28 of 42
Relating tables • Does not join, but allows simultaneous selections • Used for: • one-to-one • many-to-one • one-to-many 29 of 42
Relating tables • “Relate” updates the selection on the related table based on field relationships 30 of 42
Overview • Using ArcMap tables • Querying tables • Table relationships • Graphs from tables 31 of 42
Making graphs from tables • What are graphs? • Creating graphs from tables • Graph elements • Graph types • Graph legends • Axis properties • Axis increments and grid lines • Displaying multiple fields 32 of 42
numbers can be difficult to interpret graphs are easier to interpret What are graphs? • Graphical representation of tabular data 33 of 42
What are graphs? • Graphs are dynamically linked to tables • A selection on the table will be reflected in the graph 34 of 42
Creating graphs from tables 35 of 42
Creating graphs from tables 36 of 42
Graph elements • Graphs havemanyelementsto format 37 of 42
Graph types • A number of different types and subtypes of graphs exist 38 of 42
Axis properties • X and Y axes have various properties 39 of 42
Axis increments and grid lines • Increments and grid lines can be formatted in different ways 40 of 42
Axis increments and grid lines • A maximum value can be specified • Be careful, the graph no longer shows the data range 41 of 42
Displaying multiple fields • Multiple fields can be displayed in the graph • Comparison of variables 42 of 42