Presentation is loading. Please wait.

Presentation is loading. Please wait.

Announcements Next GIS eSeminar: Wed. Nov 8th Next GIS eSeminar: Wed. Nov 8th Agent models of population Agent models of population Dick Ettema (Utrecht)

Similar presentations


Presentation on theme: "Announcements Next GIS eSeminar: Wed. Nov 8th Next GIS eSeminar: Wed. Nov 8th Agent models of population Agent models of population Dick Ettema (Utrecht)"— Presentation transcript:

1

2 Announcements Next GIS eSeminar: Wed. Nov 8th Next GIS eSeminar: Wed. Nov 8th Agent models of population Agent models of population Dick Ettema (Utrecht) Two more lectures: Two more lectures: 1. Geographic Analysis 2. GIS and Society, Participatory GIS GIS Day: November 15 GIS Day: November 15 Final Exam: Friday, December 1 Final Exam: Friday, December 1

3 Associating Tables Because features often have many attributes, most database design guidelines promote organizing your database into multiple tables each focused on a specific topicinstead of one large table containing all the necessary fields. This scheme is more efficient because it eliminates duplicate information in the database–you store the information only once in one table. Tables can be "connected" so that when you need information that isn't in the current table, you can access it from a table associated with it. Because features often have many attributes, most database design guidelines promote organizing your database into multiple tables each focused on a specific topicinstead of one large table containing all the necessary fields. This scheme is more efficient because it eliminates duplicate information in the database–you store the information only once in one table. Tables can be "connected" so that when you need information that isn't in the current table, you can access it from a table associated with it.

4 Two tables can be connected if there is a similar field in each table containing common values. Each table must have at least one field containing unique values for each record; in database terminology, this field is called the primary key. Even if there are duplicate values in all the other fields, the primary key ensures that each row will be unique. Two tables can be connected if there is a similar field in each table containing common values. Each table must have at least one field containing unique values for each record; in database terminology, this field is called the primary key. Even if there are duplicate values in all the other fields, the primary key ensures that each row will be unique.

5 Row uniqueness is important when connecting two tables because you want to make sure the correct rows are matched together. As a general rule, you connect tables from a primary key field in one table to the common field (called the foreign key) in the other table. In the next graphic, the ZONE_CODE field exists in both tables, contains common values in each, and has unique values in each row in the attribute table on the right. The tables can be connected based on this field. Row uniqueness is important when connecting two tables because you want to make sure the correct rows are matched together. As a general rule, you connect tables from a primary key field in one table to the common field (called the foreign key) in the other table. In the next graphic, the ZONE_CODE field exists in both tables, contains common values in each, and has unique values in each row in the attribute table on the right. The tables can be connected based on this field.

6 In each table above, ZONE_CODE contains the same valuescodes for zoning types. The attribute table on the right also contains the descriptions for each code; this information is not stored in the feature attribute table, but it is information that users will want to access often. The tables will be connected so that the zoning descriptions can be easily accessed.

7 Table Relationships In ArcMap, you can connect two tables using either a join or a relate. In order to know which method to use, you need to know how individual records in each table relate to one another. You need to know if one or more than one record in the first table is associated with one or more than one record in the second table. There are four possible relationship types (also called cardinality): one-to-one, one-to- many, many-to-one, and many-to-many. In ArcMap, you can connect two tables using either a join or a relate. In order to know which method to use, you need to know how individual records in each table relate to one another. You need to know if one or more than one record in the first table is associated with one or more than one record in the second table. There are four possible relationship types (also called cardinality): one-to-one, one-to- many, many-to-one, and many-to-many.cardinality

8 Cardinality A property of a relationship between objects in a database, describing how many objects of type A are associated with how many objects of type B. Relationships can have one-to-one, one-to- many, many-to-one, and many-to-many cardinalities. A property of a relationship between objects in a database, describing how many objects of type A are associated with how many objects of type B. Relationships can have one-to-one, one-to- many, many-to-one, and many-to-many cardinalities. For example, one parcel can have one owner (one-to-one), one parcel can have many owners (one-to-many), many parcels can have one owner (many-to-one), or many parcels can have many different owners (many-to-many). For example, one parcel can have one owner (one-to-one), one parcel can have many owners (one-to-many), many parcels can have one owner (many-to-one), or many parcels can have many different owners (many-to-many).

9 Connecting tables with joins You can connect two tables together in ArcMap using a join. Join works with shapefiles, coverages, and geodatabase feature classes. Once the tables are connected, you can query, symbolize, and analyze your data based on the joined values. You can connect two tables together in ArcMap using a join. Join works with shapefiles, coverages, and geodatabase feature classes. Once the tables are connected, you can query, symbolize, and analyze your data based on the joined values. Table joins are designed for one-to-one or many-to-one relationships. For other cardinalities you should use a relate instead of a join. If you join two tables that have one-to-many or many-to-many cardinality, you will omit all records after the first match for each primary key value. Table joins are designed for one-to-one or many-to-one relationships. For other cardinalities you should use a relate instead of a join. If you join two tables that have one-to-many or many-to-many cardinality, you will omit all records after the first match for each primary key value.

10 When joining two tables, the names of the common fields need not be identical but the fields must be the same type (e.g., text, date, float, etc.). The ArcMap Join Data dialog is where you specify which tables you want to join and which fields contain the values that will match. When joining two tables, the names of the common fields need not be identical but the fields must be the same type (e.g., text, date, float, etc.). The ArcMap Join Data dialog is where you specify which tables you want to join and which fields contain the values that will match. Joined tables are not permanently connected. The fields from one table are appended to the other table. You can tell from which table a field originates because its source table name displays in its field name. You can remove a table join whenever you want. Table joins are virtual; that is, the two tables still exist as separate entities. Joined tables are not permanently connected. The fields from one table are appended to the other table. You can tell from which table a field originates because its source table name displays in its field name. You can remove a table join whenever you want. Table joins are virtual; that is, the two tables still exist as separate entities.

11

12 Connecting tables with relates Another way that you can connect tables in ArcMap is by creating a relate. Like joining tables, relating tables defines a relationship between two tables and is also based upon a common field. Unlike joining tables, a relate doesn't append the fields of one table to the other. Instead, you access data in the related table by selecting records in one table and accessing the related records in the other table. Another way that you can connect tables in ArcMap is by creating a relate. Like joining tables, relating tables defines a relationship between two tables and is also based upon a common field. Unlike joining tables, a relate doesn't append the fields of one table to the other. Instead, you access data in the related table by selecting records in one table and accessing the related records in the other table. You relate tables instead of joining them when there is a one-to-many or many-to-many relationship between the tables. You relate tables instead of joining them when there is a one-to-many or many-to-many relationship between the tables.

13 The Attributes of parcels table and the Owners table have a one-to-many relationship (a parcel may have more than one owner). The two tables are related based on the Parcel_no field. Selecting vacant parcels in the attribute table selects the records with matching parcel numbers in the related table.

14 In ArcMap, you create a relate in the Relate dialog by choosing the tables you want to relate and the fields in each that the relate will be based on. To access data in a related table, open one of the tables and select the records for which you want to display related records. Click Options, point to Related Tables, and click the name of the relate you want to access. The related table will display with the related records selected. It doesnt matter which table you open, because in ArcMap table relates are bi- directional. In ArcMap, you create a relate in the Relate dialog by choosing the tables you want to relate and the fields in each that the relate will be based on. To access data in a related table, open one of the tables and select the records for which you want to display related records. Click Options, point to Related Tables, and click the name of the relate you want to access. The related table will display with the related records selected. It doesnt matter which table you open, because in ArcMap table relates are bi- directional.

15 If your data is involved in both joins and relates, the order in which the joins and relates are created is significant. If you have a table for which you have created a relate and you join another table to it, the relate will be removed. If you perform a relate on a joined table, the relate is removed when the join is removed. As a general rule of thumb, it is best to create your joins, then add your relates. If your data is involved in both joins and relates, the order in which the joins and relates are created is significant. If you have a table for which you have created a relate and you join another table to it, the relate will be removed. If you perform a relate on a joined table, the relate is removed when the join is removed. As a general rule of thumb, it is best to create your joins, then add your relates.

16 Join Suppose you have a parcels feature attribute table and another attribute table that contains the names of parcel owners. The graphic below shows a one-to-one relationship. Each parcel has only one owner, so each record in the feature attribute table will relate to one record in the owners attribute table. For this type of relationship, you would use a table join. Suppose you have a parcels feature attribute table and another attribute table that contains the names of parcel owners. The graphic below shows a one-to-one relationship. Each parcel has only one owner, so each record in the feature attribute table will relate to one record in the owners attribute table. For this type of relationship, you would use a table join.

17 The graphics below show both a one-to-many and a many-to-one relationship. On the left, one parcel can have many owners; therefore, the relationship is one-to- many. On the right, many parcels can have one owner, resulting in a many-to-one relationship. For a one-to- many relationship, you should create a table relate; for a many-to-one relationship, you should create a table join. The graphics below show both a one-to-many and a many-to-one relationship. On the left, one parcel can have many owners; therefore, the relationship is one-to- many. On the right, many parcels can have one owner, resulting in a many-to-one relationship. For a one-to- many relationship, you should create a table relate; for a many-to-one relationship, you should create a table join.

18 You can also have relationships where many features relate to many records in the other attribute table. In this situation, many parcels could have many owners. This is the most complex relationship and can be difficult to manage. For this type of relationship, you should associate the two tables using a table relate. You can also have relationships where many features relate to many records in the other attribute table. In this situation, many parcels could have many owners. This is the most complex relationship and can be difficult to manage. For this type of relationship, you should associate the two tables using a table relate.

19 Other items to discuss sort, calculate, and freeze data in a table sort, calculate, and freeze data in a table create summary statistics create summary statistics edit feature attributes using the Attributes dialog edit feature attributes using the Attributes dialog use the Field Calculator to update attribute values use the Field Calculator to update attribute values create a graph create a graph create a report create a report

20 There are a number of ways you can display attribute data. You can change the way data is displayed in a table, and you can take data out of the table and display it as statistics or in a graph or report. There are a number of ways you can display attribute data. You can change the way data is displayed in a table, and you can take data out of the table and display it as statistics or in a graph or report.

21 Access and edit attribute data in ArcMap. When you want to edit feature attributes, you start an editing session. When you're in an editing session, you can view the attributes of selected features by clicking the Attributes button to bring up the Attributes dialog. The Attributes dialog has two parts: a tree view on the left that lists each selected feature, and a pane on the right that shows the attribute values for the feature currently selected in the tree view. When you want to edit feature attributes, you start an editing session. When you're in an editing session, you can view the attributes of selected features by clicking the Attributes button to bring up the Attributes dialog. The Attributes dialog has two parts: a tree view on the left that lists each selected feature, and a pane on the right that shows the attribute values for the feature currently selected in the tree view.

22

23 If you select features from more than one layer, each layer that contains selected features will be listed in the tree view. You can access individual selected features by expanding their layer If you select features from more than one layer, each layer that contains selected features will be listed in the tree view. You can access individual selected features by expanding their layer

24

25 You can edit the attribute values for a single feature by clicking next to the field name and typing in the new value. You can edit the attribute values for a single feature by clicking next to the field name and typing in the new value.

26 If you want to change values for all the selected features at once, you can click the layer name and type the new value next to the field you want to update. In the graphic below, the OWNER values for all the selected homes are being changed to "Alvi Contracting." If you want to change values for all the selected features at once, you can click the layer name and type the new value next to the field you want to update. In the graphic below, the OWNER values for all the selected homes are being changed to "Alvi Contracting."

27 Table manipulation You can manipulate tables to change how data is viewed. Right- clicking any field brings up a context menu with many choices. You can sort the record values in a selected field either in ascending or descending order. You can sort both numeric and character fields. You can manipulate tables to change how data is viewed. Right- clicking any field brings up a context menu with many choices. You can sort the record values in a selected field either in ascending or descending order. You can sort both numeric and character fields.

28 You can calculate the values of selected records using the Field Calculator. In the Field Calculator, you can update all the values or a selected set of values in a field at one time. You can calculate the values of selected records using the Field Calculator. In the Field Calculator, you can update all the values or a selected set of values in a field at one time.

29 Using the Field Calculator In ArcMap, you can edit feature attributes by creating simple calculations or logical expressions in the Field Calculator. The Field Calculator works on selected features or on all features in a layer if there are none selected. In ArcMap, you can edit feature attributes by creating simple calculations or logical expressions in the Field Calculator. The Field Calculator works on selected features or on all features in a layer if there are none selected. To access the Field Calculator, first start an editing session, then open the desired layer's attribute table by right-clicking the layer name in the Table of Contents. Choose Open Attribute Table and when the table displays, right-click the field you want to update. Choose Calculate Values to display the Field Calculator. To access the Field Calculator, first start an editing session, then open the desired layer's attribute table by right-clicking the layer name in the Table of Contents. Choose Open Attribute Table and when the table displays, right-click the field you want to update. Choose Calculate Values to display the Field Calculator.

30

31 To create an expression in the Field Calculator, you combine fields, functions, and operators. As you click on fields and functions, they appear in the expression box. You can also type directly into the box. The expression below will update the VALUE field with the results of multiplying each feature's area by 1.5. To create an expression in the Field Calculator, you combine fields, functions, and operators. As you click on fields and functions, they appear in the expression box. You can also type directly into the box. The expression below will update the VALUE field with the results of multiplying each feature's area by 1.5.

32 Freeze or unfreeze a column Freezing a column locks a column as the left-most column in the table view. You can then use the horizontal scroll bar to see the other columns in the table. When you scroll, the frozen column remains in place while all other columns move. A frozen column is easily identified because it has a thick black line separating it from the other columns in the table. Freezing a column locks a column as the left-most column in the table view. You can then use the horizontal scroll bar to see the other columns in the table. When you scroll, the frozen column remains in place while all other columns move. A frozen column is easily identified because it has a thick black line separating it from the other columns in the table.

33 Calculating statistics After selecting features on the map or selecting records in a table, you may want to calculate simple summary statistics for the data. (Choose the Statistics option from ArcMap's Selection menu) After selecting features on the map or selecting records in a table, you may want to calculate simple summary statistics for the data. (Choose the Statistics option from ArcMap's Selection menu) After you select the layer and field in the feature attribute table for which you want statistics calculated, a list of summary statistics, as well as a frequency distribution chart, display in the Selection Statistics window. After you select the layer and field in the feature attribute table for which you want statistics calculated, a list of summary statistics, as well as a frequency distribution chart, display in the Selection Statistics window.

34 Graphs in ArcGIS Values for ArcGIS graphs come directly from feature attribute tables. You can represent your data and analysis results using many styles of graphs, including both two- and three- dimensional graphs. Some graphs are better than others at presenting certain kinds of information. You should carefully consider the information you want to present before choosing a graph style. Values for ArcGIS graphs come directly from feature attribute tables. You can represent your data and analysis results using many styles of graphs, including both two- and three- dimensional graphs. Some graphs are better than others at presenting certain kinds of information. You should carefully consider the information you want to present before choosing a graph style.

35 Once you've created a graph, you can add it to a map in ArcMap's Layout View. When placed on the layout, a graph becomes a graphic element that you can size and position as desired. Once you've placed a graph on a layout, however, it becomes static and changes to the graph's source table will not be reflected in the graph. Once you've created a graph, you can add it to a map in ArcMap's Layout View. When placed on the layout, a graph becomes a graphic element that you can size and position as desired. Once you've placed a graph on a layout, however, it becomes static and changes to the graph's source table will not be reflected in the graph.

36 Reports A report presents tabular information about map features (from a feature attribute table) formatted in an attractive manner. You can choose which fields from your table you want to display and how you want to display them. Once you've created a report, you can place it on your map layout with your geographic data or save it as a file for distribution. A report presents tabular information about map features (from a feature attribute table) formatted in an attractive manner. You can choose which fields from your table you want to display and how you want to display them. Once you've created a report, you can place it on your map layout with your geographic data or save it as a file for distribution. A report includes a title, page numbers and the current date, summary statistics, images, borders, and, of course, the data from the feature attribute table. A report includes a title, page numbers and the current date, summary statistics, images, borders, and, of course, the data from the feature attribute table.

37

38 Displaying your data in a report allows you to organize your data. You can sort records based on the values in one or more fieldsgiven a list of cities, you could sort them by total population, for example. You can also group records and calculate summary statistics. For example, you could group cities by their country. It would then be easy to see which city has the largest population in a given country. You can also calculate summary statisticssum, average, count, standard deviation, minimum, and maximum values. Displaying your data in a report allows you to organize your data. You can sort records based on the values in one or more fieldsgiven a list of cities, you could sort them by total population, for example. You can also group records and calculate summary statistics. For example, you could group cities by their country. It would then be easy to see which city has the largest population in a given country. You can also calculate summary statisticssum, average, count, standard deviation, minimum, and maximum values. You can export reports to different file types, including Adobe's Portable Document Format (PDF), Rich Text Format (RTF), or plain text (TXT). You can export reports to different file types, including Adobe's Portable Document Format (PDF), Rich Text Format (RTF), or plain text (TXT).

39 Groups for Oslo Project Group 1:Group 5: Group 1:Group 5: Karianne Fjellskaalnes Karianne FjellskaalnesRagnhild Andersen Merete Olsen Merete Olsen Kaja Killingstad Group 2:Group 6: Group 2:Group 6: Kathrine AkreEric Strickler Stian BergeSimon Tedder Camilla NestegardLuca Ippoliti Group 3:Group 7 Group 3:Group 7 Jens HalvorsenSofie Skåra Jens HalvorsenSofie Skåra Jostein Tysild Ida Skivenes Jostein Tysild Ida Skivenes Anne Grete Trevor Marie Therese Torstensson Anne Grete Trevor Marie Therese Torstensson Group 4:Group 8 Group 4:Group 8 Marie Hesselberg SimonsenAstrid Bjørlo Liv Inger GabrielsenAslak Stensrud Rikke Marie Fjell Jørgensen Ida Sellereite Fjell


Download ppt "Announcements Next GIS eSeminar: Wed. Nov 8th Next GIS eSeminar: Wed. Nov 8th Agent models of population Agent models of population Dick Ettema (Utrecht)"

Similar presentations


Ads by Google