homework assignment 3 joins overview in this scenario you are interest
Search for question
Question
Homework Assignment 3. Joins
Overview
In this scenario, you are interested in knowing more about robberies around parks. You visited all
of the parks in Acme City to collect more data about the city's parks, but now you need to join the
data you collected about parks to the parks feature class. Next, you will count up the number of
robberies in a series of street corner units to determine if high robbery street corners are located
near parks. Overall, you will create a map showing different parks and their use of rules to control
behavior and street corner robbery rates to determine if parks with or without rules posted are
related to higher street robbery levels.
Files Needed: 1) Crime_Mapping.aprx and the 2) Crime, 3) Neighborhoods, 4) Parks, 5) River,
and 6) Streets, 7) Street_Corner_Units feature classes saved in the Acme_City.gdb as well as the
8) Parks_Site_Visit_Data.dbf file you can download from the homework assignment 3 page.
Getting Started
We are going to practice some skills we previously learned by starting this assignment from
"scratch".
1. Open the ArcGIS Pro program on your computer
2. Load the Crime_Mapping.aprx file
The Map and Homework 1 and 2 layouts within the Crime_Mapping project should open in
ArcPro.
Add a New Map
1. Click the Insert ribbon >
2. Under Project, Click New Map >
3. Select New Map
A new Map window will be added to your project. It will receive a default name using Map and a
number like 1 or 2 depending on how many maps you have previously added to your Project.
4. With the new Map window open, in the Contents window, click the new map's name
once, and then once more to make the name editable
5. Rename the new map Map - Parks & Robberies
Remove the base maps:
6. Right click World Topographic Map in the Contents window > Click Remove
7. Right click World Hillshade in the Contents window > Click Remove
19 Add the following course data to the Map.
8. Parks, River, Street_Corner_Units, and Streets feature classes
9. Use the same process to add the Robbery layer from the
C:\CrimeMapping\Data\MyOutput folder
Change Map Symbology
Change the default symbology of each feature class. You can do that by right-clicking on a layer
and clicking symbology.
1. Change Robbery to Circle 3 & Size = "5 pt"
2. Change Streets to a Black line color
3. Change River to the scheme 2 "Water (area)" option
4. Changes Parks to Leaf Green
5. Ignore the Street_Corner_Units for now
Re-Arrange the Layer Drawing Order
Rearrange the drawing from top to bottom to be:
1. Robbery
2. Streets
3. Parks
4. Street Corner Units
5. River
Table Join (Join by Attributes): Joining Park Site Visit Data
Now we are going to join the data about parks we collected on our site visits to the Parks layer.
To add the Parks site visit data:
1. On the Map ribbon, under Layer, Click Add Data >
2. Data >
3. Navigate to the folder where you saved the Parks_Site_Visit_Data.dbf file >
4. Click the Parks_Site_Visit_Data.dbf file >
5. Click OK
The site visit data for the parks will be added to your Contents pane under "Standalone Tables".
We need to join the park site visit data to the Parks feature class.
20
20 ?
X
1. Right-click Parks > Joins and relates > Add Join
The Join Data dialog box will open.
2. In Input Table select Parks
3. In Input Join Field select NAME
4. In Join Table select Parks_Site_Visit_Data
5. In Join Table Field select NAME
6. Tick Keep All Target Features
7. Click OK
Now have a look at the results of your join.
1. Right-click on the Parks layer > Click Attribute
Table
Scroll to the right
Add Join
Input Table
Parks
Input Join Field
NAME
Join Table
Parks Site Visit Data
Join Table Field
NAME
Keep All Target Features
Index Joined Fields
Validate Join
國 Add Join
Remove Join
Remove All Joins
Add Spatial Join
Add Relate
Remove Relate
Remove All Relates
All of the data collected about parks should show up, like below, in the Park layer's attribute table.
Parks - CrimeMapping - ArcGIS Pro
Parks X
<
Field: Add Calculate
Selection: Select By Attributes
Zoom To
Switch
Clear
Delete Copy
OBJECTID 1* Shape OBJECTID NAME
1
1
Polygon
3509 Habsland Park
Shape_Length Shape_Area OID OBJECTID NAME
4139.325154 811500.447424 0
3509 Habsland Park
Hours Rules
Yes
Yes
2
2
Polygon
4145 Avon Garden
2919.851542 340076.643325 1
3
3
Polygon
4
4
Polygon
5
5
Polygon
6 6
Polygon
7
7
Polygon
2082 DolphinPark
5763 Old City Woods
7051 Bell View Park
4287 Rhineland Park
5444 Hidden Park
7955.383897 1033019.340843 2
4145 Avon Garden
2082 DolphinPark
Yes Yes
No
No
7702.885712 3177193.520568 3
5763 Old City Woods
Yes
Yes
3357.401628 330220.649631 4
7051 Bell View Park
No
No
8
8
Polygon
4491 Open Fields
2394.836324 318653.145445 5
4372.368342 848455.943374 6
1758.891437 183132.308939 7
4287 Rhineland Park
No
No
5444 Hidden Park
Yes
Yes
4491 Open Fields
Yes
Yes
9
9
Polygon
4493 Hopkins Park
825.235607 39460.223366 8
4493 Hopkins Park
Yes
Yes
10 10
Polygon
0 West Side Sports Com... 2907.510035 432875.454317 9
0 West Side Sports Com... No
No
0 of 10 selected
Filters:
+
+ 100%
OK
Making a Table Join Permanent
Table joins are temporary. You can make a Table Join permanent by exporting a feature class after
you join a data table to it.
1. Right-click the Parks layer > Data > Export Features
2. Confirm
a. Input Features: Parks
b. Click the folder icon next to Output Feature Class:
3. Navigate to C:\CrimeMapping\Data\MyOutput >
21 4. Type Parks_with_data in Name: >
5. Confirm the far-right drop-down is set to Feature Classes (All Types) >
6. Click Save >
7. Click OK
If you open the attribute table for the Parks_with_data layer, you will see the additional data we
collected on bars.
Point-in-Polygon Spatial Join: Joining Robberies to Street Corner Units
Now you need to count up the number of robberies within each street corner. The
Street Corner_Units feature class is a layer of street intersection centered Thiessen polygons.
Thiessen polygons are a unique type of polygon commonly used in crime mapping. The Thiessens
are drawn so that every point in a given polygon is closer to the centroid of that polygon than any
other polygon's centroid. Centroid is just a fancy word for center. Since these Thiessen polygons
were created using street corners as the centroid, any point (or crime event) in a polygon is closer
that street corner than any other street corner.
To count up all the robberies in the Thiessen polygons:
1. Click the Analysis ribbon>
2. Under Tools, scroll to the default
3. Click Summarize Within
group
>
The Summarize Within dialog box will open.
4. In Input Polygons select Street_Corner_Units
5. In Input Summary Features select Robbery
6. In Output Features Class click the folder icon >
7. Navigate to
C:\CrimeMapping\Data\Acme_City.gdb
Note that this tool only outputs feature classes within
geodatabases.
8. In Name type Street_Corner_Robbery_Counts
9. Confirm the far-right drop-down reads Feature
Class (All Types)
10. Click Save
Geoprocessing
Summarize Within
+
Parameters Environments
?
Input Polygons
Street Corner Units
Input Summary Features
Robbery
Output Feature Class
Street Corner_Robbery_Counts
Keep all input polygons
Summary Fields
Field
Add shape summary attributes
Group Field
11. Click Run (you can check your work with the dialog box to the right)
Statistic
Run
하
22
22 Creating a Map: Street Corner Robbery Counts & Park Rules Posting
You can now use the Robbery counts to create a map that shows low to high robbery corners. You
have two options here: 1) you can display a raw robbery count or 2) you can display a robbery
rate. We'll focus on robbery rates in this exercise so you can learn some additional GIS skills, but
feel free to compare the robbery count map to your robbery rate map on your own.
First, let's look at the street robbery count variable.
1. Right-click the Street_Corner_Robbery_Counts layer > Click Attribute Table
2. Scroll to the right until you seen the field Count of Points
3. Right-click the field Count of Points > Click Sort Descending
You can see the maximum street corner robbery count is 5.
4. Right-click the field Count of Points:
5. Click Statistics
Two panels open. A graph showing the distribution of the Count of Points variable opens in the
Attribute Table and descriptive statistics formatting options open as well. If you click on the bars
in the histogram you will see the street corners with those respective crime counts are selected in
the map. You can also get the number of street corners within each grouping by hovering the mouse
over the bars. We can see the counts are mostly zeroes (n = 1,288) with some ones (n = 246), twos
(n = 66), threes (n = 23), fours (n = 9), and a few fives (n = 3).
Count
Street Corner_Robbery_Counts - Distribution of Count of Points - CrimeMapping - ArcGIS Pro
Street Corner_Robbery_Counts
Street Corner_Robber...Count of Points X
Filter: 曷:
☑
1,200
1,000
800
600
400
200
Distribution of Count of Points
Count of Points
23
☐
-Mean: 0.30459